btrfs: put initial index value of a directory in a constant
authorFilipe Manana <fdmanana@suse.com>
Wed, 15 Dec 2021 12:19:59 +0000 (12:19 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Feb 2022 15:35:59 +0000 (16:35 +0100)
commitdcaf8752a9b835bedb856dd496a93d21a3f0f50c
treef1fb8585b42b6ac8d8ae4b6e9835e75157ae72cd
parent4af340b9878b1fba3adc7859e761e34040fce485
btrfs: put initial index value of a directory in a constant

At btrfs_set_inode_index_count() we refer twice to the number 2 as the
initial index value for a directory (when it's empty), with a proper
comment explaining the reason for that value. In the next patch I'll
have to use that magic value in the directory logging code, so put
the value in a #define at btrfs_inode.h, to avoid hardcoding the
magic value again at tree-log.c.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c