Skip to content

Commit 9597376

Browse files
riteshharjanitytso
authored andcommitted
ext4: Rename and document EXT4_EX_FILTER to EXT4_EX_QUERY_FILTER
Rename EXT4_EX_FILTER to EXT4_EX_QUERY_FILTER to better describe its purpose as a filter mask used specifically in ext4_map_query_blocks(). Add a comment explaining that this macro is used to filter flags needed when querying the on-disk extent tree. We will later use EXT4_EX_QUERY_FILTER mask to add another EXT4_GET_BLOCKS_QUERY needed to lookup in on-disk extent tree. Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Link: https://patch.msgid.link/51f05d0ba286372eb8693af95bd4b10194b53141.1747677758.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 797ac3c commit 9597376

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

fs/ext4/ext4.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,12 @@ enum {
757757
#define EXT4_EX_NOCACHE 0x40000000
758758
#define EXT4_EX_FORCE_CACHE 0x20000000
759759
#define EXT4_EX_NOFAIL 0x10000000
760-
#define EXT4_EX_FILTER 0x70000000
760+
/*
761+
* ext4_map_query_blocks() uses this filter mask to filter the flags needed to
762+
* pass while lookup/querying of on disk extent tree.
763+
*/
764+
#define EXT4_EX_QUERY_FILTER (EXT4_EX_NOCACHE | EXT4_EX_FORCE_CACHE |\
765+
EXT4_EX_NOFAIL)
761766

762767
/*
763768
* Flags used by ext4_free_blocks

fs/ext4/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static int ext4_map_query_blocks(handle_t *handle, struct inode *inode,
546546
unsigned int orig_mlen = map->m_len;
547547
unsigned int query_flags = flags & EXT4_GET_BLOCKS_QUERY_LAST_IN_LEAF;
548548

549-
flags &= EXT4_EX_FILTER;
549+
flags &= EXT4_EX_QUERY_FILTER;
550550
if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
551551
retval = ext4_ext_map_blocks(handle, inode, map,
552552
flags | query_flags);

0 commit comments

Comments
 (0)