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

2014-01-07 Thread David Sterba
On Tue, Jan 07, 2014 at 11:59:18AM +0800, Miao Xie wrote: But I read a discuss about the use of boolean type, some developers suggested us to use bitfields instead of bool, because the bitfields can work better, and they are more flexible, less misuse than bool.

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

2014-01-06 Thread Miao Xie
On Fri, 3 Jan 2014 19:36:10 +0100, David Sterba wrote: On Fri, Jan 03, 2014 at 05:27:51PM +0800, Miao Xie wrote: On Thu, 2 Jan 2014 18:49:55 +0100, David Sterba wrote: On Thu, Dec 26, 2013 at 01:07:05PM +0800, Miao Xie wrote: +#define BTRFS_DELAYED_NODE_IN_LIST0 +#define

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

2014-01-03 Thread David Sterba
On Fri, Jan 03, 2014 at 05:27:51PM +0800, Miao Xie wrote: On Thu, 2 Jan 2014 18:49:55 +0100, David Sterba wrote: On Thu, Dec 26, 2013 at 01:07:05PM +0800, Miao Xie wrote: +#define BTRFS_DELAYED_NODE_IN_LIST0 +#define BTRFS_DELAYED_NODE_INODE_DIRTY1 + struct

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

2014-01-02 Thread David Sterba
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