Lines Matching defs:key

276 	fn = (FILE_NAME_ATTR *)&ie->key;
515 * Make sure data and key do not overflow from entry.
532 && ((le16_to_cpu(ie->key_length) + offsetof(INDEX_ENTRY, key))
540 if ((offsetof(INDEX_ENTRY, key.file_name.file_name)
541 + ie->key.file_name.file_name_length
564 * Find a key in the index block.
575 static int ntfs_ie_lookup(const void *key, const int key_len,
602 * The last entry cannot contain a key. It can however contain
616 /* Make sure key and data do not overflow from entry */
622 rc = icx->collate(icx->ni->vol, key, key_len,
623 &ie->key, le16_to_cpu(ie->key_length));
631 * If @key collates before the key of the current entry, there
632 * is definitely no such key in this index but we might need to
738 * ntfs_index_lookup - find a key in an index and return its index entry
739 * @key: [IN] key for which to search in the index
740 * @key_len: [IN] length of @key in bytes
746 * Look for the @key in the index specified by the index lookup context @icx.
747 * ntfs_index_lookup() walks the contents of the index looking for the @key.
749 * If the @key is found in the index, 0 is returned and @icx is setup to
750 * describe the index entry containing the matching @key. @icx->entry is the
754 * If the @key is not found in the index, -1 is returned, errno = ENOENT and
755 * @icx is setup to describe the index entry whose key collates immediately
756 * after the search @key, i.e. this is the position in the index at which
757 * an index entry with a key of @key would need to be inserted.
769 int ntfs_index_lookup(const void *key, const int key_len, ntfs_index_context *icx)
780 if (!key || key_len <= 0) {
782 ntfs_log_perror("key: %p key_len: %d", key, key_len);
816 ret = ntfs_ie_lookup(key, key_len, icx, &ir->index, &vcn, &ie);
858 ret = ntfs_ie_lookup(key, key_len, icx, &ib->index, &vcn, &ie);
893 icx->data = (u8 *)ie + offsetof(INDEX_ENTRY, key);
1570 if (!ntfs_index_lookup(&ie->key, le16_to_cpu(ie->key_length), icx)) {
1648 memcpy(&ie->key, fn, fn_size);
1962 const void *key, const int keylen)
1973 if (ntfs_index_lookup(key, keylen, icx))
2134 * +---+---+---+---+---+---+---+---+ no key in last entry
2158 * when searching for a partial key