• Tahsin Erdogan's avatar
    ext4: backward compatibility support for Lustre ea_inode implementation · a6d05676
    Tahsin Erdogan authored
    Original Lustre ea_inode feature did not have ref counts on xattr inodes
    because there was always one parent that referenced it. New
    implementation expects ref count to be initialized which is not true for
    Lustre case. Handle this by detecting Lustre created xattr inode and set
    its ref count to 1.
    
    The quota handling of xattr inodes have also changed with deduplication
    support. New implementation manually manages quotas to support sharing
    across multiple users. A consequence is that, a referencing inode
    incorporates the blocks of xattr inode into its own i_block field.
    
    We need to know how a xattr inode was created so that we can reverse the
    block charges during reference removal. This is handled by introducing a
    EXT4_STATE_LUSTRE_EA_INODE flag. The flag is set on a xattr inode if
    inode appears to have been created by Lustre. During xattr inode reference
    removal, the manual quota uncharge is skipped if the flag is set.
    Signed-off-by: default avatarTahsin Erdogan <tahsin@google.com>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    a6d05676
inode.c 178 KB