Re: [PATCH v2 5/6] Btrfs: use flags instead of the bool variants in delayed node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 26, 2013 at 01:07:05PM +0800, Miao Xie wrote:
> +#define BTRFS_DELAYED_NODE_IN_LIST	0
> +#define BTRFS_DELAYED_NODE_INODE_DIRTY	1
> +
>  struct btrfs_delayed_node {
>  	u64 inode_id;
>  	u64 bytes_reserved;
> @@ -65,8 +68,7 @@ struct btrfs_delayed_node {
>  	struct btrfs_inode_item inode_item;
>  	atomic_t refs;
>  	u64 index_cnt;
> -	bool in_list;
> -	bool inode_dirty;
> +	unsigned long flags;
>  	int count;
>  };

What's the reason to do that? Replacing 2 bools with a bitfield
does not seem justified, not from saving memory, nor from a performance
gain side.  Also some of the bit operations imply the lock instruction
prefix so this affects the surrounding items as well.

I don't think this is needed, unless you have further plans with the
flags item.


david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux