Lines Matching refs:section

404 	 * Xor the number with section and sector, so that if a piece of
706 static void access_journal_check(struct dm_integrity_c *ic, unsigned int section, unsigned int offset,
712 if (unlikely(section >= ic->journal_sections) ||
715 function, section, offset, ic->journal_sections, limit);
721 static void page_list_location(struct dm_integrity_c *ic, unsigned int section, unsigned int offset,
726 access_journal_check(ic, section, offset, false, "page_list_location");
728 sector = section * ic->journal_section_sectors + offset;
735 unsigned int section, unsigned int offset, unsigned int *n_sectors)
740 page_list_location(ic, section, offset, &pl_index, &pl_offset);
750 static struct journal_sector *access_journal(struct dm_integrity_c *ic, unsigned int section, unsigned int offset)
752 return access_page_list(ic, ic->journal, section, offset, NULL);
755 static struct journal_entry *access_journal_entry(struct dm_integrity_c *ic, unsigned int section, unsigned int n)
760 access_journal_check(ic, section, n, true, "access_journal_entry");
765 js = access_journal(ic, section, rel_sector);
769 static struct journal_sector *access_journal_data(struct dm_integrity_c *ic, unsigned int section, unsigned int n)
775 access_journal_check(ic, section, n, false, "access_journal_data");
777 return access_journal(ic, section, n);
780 static void section_mac(struct dm_integrity_c *ic, unsigned int section, __u8 result[JOURNAL_MAC_SIZE])
803 section_le = cpu_to_le64(section);
812 struct journal_entry *je = access_journal_entry(ic, section, j);
850 static void rw_section_mac(struct dm_integrity_c *ic, unsigned int section, bool wr)
858 section_mac(ic, section, result);
861 struct journal_sector *js = access_journal(ic, section, j);
883 static void xor_journal(struct dm_integrity_c *ic, bool encrypt, unsigned int section,
899 page_list_location(ic, section, 0, &pl_index, &pl_offset);
916 rw_section_mac(ic, section, true);
917 section++;
921 page_list_location(ic, section, 0, &section_index, &dummy);
978 static void crypt_journal(struct dm_integrity_c *ic, bool encrypt, unsigned int section,
1000 rw_section_mac(ic, section, true);
1002 req = ic->sk_requests[section];
1008 req->src = source_sg[section];
1009 req->dst = target_sg[section];
1014 section++;
1022 static void encrypt_journal(struct dm_integrity_c *ic, bool encrypt, unsigned int section,
1026 return xor_journal(ic, encrypt, section, n_sections, comp);
1028 return crypt_journal(ic, encrypt, section, n_sections, comp);
1088 unsigned int section, unsigned int n_sections,
1093 sector = section * ic->journal_section_sectors;
1162 static void copy_from_journal(struct dm_integrity_c *ic, unsigned int section, unsigned int offset,
1177 sector = section * ic->journal_section_sectors + JOURNAL_BLOCK_SECTORS + offset;
3131 DEBUG_print("continuing from section %u, commit seq %d\n", write_start, ic->commit_seq);