Re: [PATCH 1/2] Btrfs: add datacow flag in inode flag

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

 



On 2011-03-15, at 2:57 PM, Christoph Hellwig wrote:
> On Tue, Mar 15, 2011 at 04:26:50PM -0400, Chris Mason wrote:
>>  #define FS_EXTENT_FL         0x00080000 /* Extents */
>>  #define FS_DIRECTIO_FL       0x00100000 /* Use direct i/o */
>> +#define FS_NOCOW_FL          0x00800000 /* Do not cow file */
>> +#define FS_COW_FL            0x01000000 /* Cow file */
>>  #define FS_RESERVED_FL       0x80000000 /* reserved for ext2 lib */
> 
> I'm fine with it.  I'll defer the check for conflicts with extN-specific flags
> to Ted, though.

Looking at the upstream e2fsprogs I see in that range:

> #define EXT4_EXTENTS_FL           0x00080000 /* Inode uses extents */
> #define EXT4_EA_INODE_FL          0x00200000 /* Inode used for large EA */
> #define EXT4_EOFBLOCKS_FL         0x00400000 /* Blocks allocated beyond EOF */
> #define EXT4_SNAPFILE_FL          0x01000000 /* Inode is a snapshot */
> #define EXT4_SNAPFILE_DELETED_FL  0x04000000 /* Snapshot is being deleted */
> #define EXT4_SNAPFILE_SHRUNK_FL   0x08000000 /* Snapshot shrink has completed */
> #define EXT2_RESERVED_FL          0x80000000 /* reserved for ext2 lib */
> 
> #define EXT2_FL_USER_VISIBLE      0x004BDFFF /* User visible flags */

so there is a conflict with FS_COW_FL and EXT4_SNAPFILE_FL.  I don't know the semantics of those two flags enough to say for sure whether it is reasonable that they alias to each other, but at first glance "COW" and "SNAPSHOT" don't seem completely unrelated.

It also isn't clear to me whether the SNAPFILE_DELETED_FL and SNAPFILE_SHRUNK_FL really need to be persistent flags that are stored on disk, or if they are state flags that should only be stored in the in-memory inode?  Not having them in the limited remaining inode flag space would be better...  Amir?

Cheers, Andreas





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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux