X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=ldiskfs%2Fkernel_patches%2Fpatches%2Flinux-5.4%2Fext4-data-in-dirent.patch;fp=ldiskfs%2Fkernel_patches%2Fpatches%2Flinux-5.4%2Fext4-data-in-dirent.patch;h=6f34417474c0c36277aada6a32bb2d0111873263;hb=0777144705f0abf351dedb5262aea9aa71903d38;hp=c347f79d9f91dc03ef01a86954622f92f5dbd249;hpb=ba6b65cccbe9836f42177920b2841e2d421f52e8;p=fs%2Flustre-release.git diff --git a/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch b/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch index c347f79..6f34417 100644 --- a/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch +++ b/ldiskfs/kernel_patches/patches/linux-5.4/ext4-data-in-dirent.patch @@ -1,11 +1,26 @@ -this patch implements feature which allows ext4 fs users (e.g. Lustre) -to store data in ext4 dirent. -data is stored in ext4 dirent after file-name, this space is accounted -in de->rec_len. flag EXT4_DIRENT_LUFID added to d_type if extra data -is present. +commit 2db3b2b33ee796f4ea61316773452d936303ad27 +Author: Pravin Shelar +AuthorDate: Sun Oct 4 18:13:14 2009 +0000 +Subject: ext4: add ext4-data-in-dirent patch -make use of dentry->d_fsdata to pass fid to ext4. so no -changes in ext4_add_entry() interface required. +Allows ext4 to store extra data records inside the ext4_dirent +along with the regular directory entry (type, length, filename). +Data is stored in ext4 dirent after filename, with a bit flag in +de->file_type to indicate if any record after de->name is used. +Each in-use record is variable length and must store a 1-byte +length (including the length byte itself) at the start so that it +can be skipped if the record type is unknown/uneeded. The record +starts after a NUL byte terminator for the filename. This extra +space is accounted in de->rec_len but not de->name_len. + +Flag EXT4_DIRENT_LUFID is used for a 128-bit file identifier. +Make use of dentry->d_fsdata to pass LUFID to ext4, so no changes +in ext4_add_entry() interface are required. + +Bugzilla-ID: b=17670 +Signed-off-by: Pravin Shelar +Reviewed-by: Huang Hua +Signed-off-by: Andreas Dilger diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 9fdd2b2..2a73a69 100644