ntfs: wire up the fileattr API
cover ntfs: wire up the fileattr API
From: Baolin Liu <[email protected]>
This series implements fileattr_get and fileattr_set for ntfs so that lsattr(1) and chattr(1) work on ntfs.
Patch 1 wires up the fileattr inode operations and implements support for FS_IMMUTABLE_FL and FS_APPEND_FL. These flags map to inode->i_flags (S_IMMUTABLE, S_APPEND), so the VFS enforces them. fileattr_get also reports the compressed and encrypted state, which the driver already exposes through STATX_ATTR_* in ntfs_getattr().
Patch 2 adds FS_NODUMP_FL support, which dump(8) and other backup tools use to mark files to skip. The flag is stored in a new ntfs_inode field and reported through both fileattr_get (for lsattr) and ntfs_getattr() (as STATX_ATTR_NODUMP, for statx), so the two interfaces stay consistent.
All three accepted flags (immutable, append-only, nodump) are kept in memory and do not survive a remount, matching ntfs3 behavior.
Tested in QEMU on an NTFS volume, both with chattr(1)/lsattr(1) and with a test binary issuing the ioctls directly:
- chattr +i/+a/+d each set the flag and lsattr reads it back
- appending to a +i file fails with EPERM
- statx(2) reports STATX_ATTR_NODUMP once nodump is set, and stops reporting it once cleared
- FS_COMPR_FL is rejected with EOPNOTSUPP
- lsattr reports 'c' on a compressed file
- chattr -i/-a/-d clear the flags, and a flag set before unmounting is gone after dropping caches and mounting again
Baolin Liu (2):
ntfs: implement fileattr_get and fileattr_set
ntfs: support the nodump flag
fs/ntfs/file.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++- fs/ntfs/inode.c | 1 + fs/ntfs/inode.h | 1 + fs/ntfs/ntfs.h | 4 +++ 4 files changed, 70 insertions(+), 1 deletion(-)
Signature · 1 line
2.51.0
PATCH 1/2 ntfs: implement fileattr_get and fileattr_set
From: Baolin Liu <[email protected]>
Wire up the fileattr inode operations so that lsattr(1) and chattr(1) work on ntfs.
fileattr_get reports the compressed and encrypted state of the attribute and the immutable and append-only flags, the same states ntfs_getattr() already reports through STATX_ATTR_*.
fileattr_set accepts only FS_IMMUTABLE_FL and FS_APPEND_FL. Compression and encryption are rejected because changing them would require rewriting the attribute data. Both accepted flags go to inode->i_flags, so the VFS enforces them.
Neither flag has an on-disk representation of its own, so a value set through fileattr_set only lives for the lifetime of the mount. Note also that S_IMMUTABLE is re-derived on every mount, from FILE_ATTR_SYSTEM when mounted with sys_immutable and unconditionally for system files, so clearing it on such a file does not survive a remount either.
--- fs/ntfs/file.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ntfs/ntfs.h | 4 ++++ 2 files changed, 60 insertions(+)
fs/ntfs/file.c +56 -0
@@ -15,6 +15,7 @@#include <linux/posix_acl_xattr.h> #include <linux/compat.h> #include <linux/falloc.h> +#include <linux/fileattr.h> #include "lcnalloc.h" #include "ntfs.h"
@@ -135,6 +136,59 @@ static int ntfs_file_release(struct inode *vi, struct file *filp)return 0 ; } +/* +* ntfs_fileattr_get - inode_operations::fileattr_get +* @dentry: dentry to report the flags of +* @fa: filled in with the flags of @dentry +*/ +int ntfs_fileattr_get (struct dentry *dentry,struct file_kattr *fa) +{ +struct inode *vi =d_inode (dentry); +struct ntfs_inode *ni =NTFS_I (vi); +u32 flags =0 ; + +if (NInoCompressed (ni) ||NInoWofCompressed (ni)) + flags |=FS_COMPR_FL ; +if (NInoEncrypted (ni)) + flags |=FS_ENCRYPT_FL ; +if (vi->i_flags &S_IMMUTABLE ) + flags |=FS_IMMUTABLE_FL ; +if (vi->i_flags &S_APPEND ) + flags |=FS_APPEND_FL ; + +fileattr_fill_flags (fa, flags); +return 0 ; +} + +/* +* ntfs_fileattr_set - inode_operations::fileattr_set +* @idmap: idmap of the mount @dentry was found from +* @dentry: dentry to set the flags of +* @fa: flags to set +*/ +int ntfs_fileattr_set (struct mnt_idmap *idmap,struct dentry *dentry, +struct file_kattr *fa) +{ +struct inode *vi =d_inode (dentry); +unsigned int new_fl =0 ; + +if (fileattr_has_fsx (fa)) +return -EOPNOTSUPP ; +if (fa->flags & ~(FS_IMMUTABLE_FL |FS_APPEND_FL )) +return -EOPNOTSUPP ; + +if (fa->flags &FS_IMMUTABLE_FL ) + new_fl |=S_IMMUTABLE ; +if (fa->flags &FS_APPEND_FL ) + new_fl |=S_APPEND ; + +inode_set_flags (vi, new_fl,S_IMMUTABLE |S_APPEND ); + +inode_set_ctime_current (vi); +mark_inode_dirty (vi); +return 0 ; +} +/* * ntfs_file_fsync - sync a file to disk * @filp: file to be synced
@@ -1215,6 +1269,8 @@ const struct file_operations ntfs_file_ops = {const struct inode_operations ntfs_file_inode_ops = { .setattr = ntfs_setattr, .getattr = ntfs_getattr, + .fileattr_get = ntfs_fileattr_get, + .fileattr_set = ntfs_fileattr_set, .listxattr = ntfs_listxattr, .get_acl = ntfs_get_acl, .set_acl = ntfs_set_acl,
fs/ntfs/ntfs.h +4 -0
@@ -183,6 +183,10 @@ extern const struct inode_operations ntfs_dir_inode_ops;extern const struct file_operations ntfs_empty_file_ops;extern const struct inode_operations ntfs_empty_inode_ops; +extern int ntfs_fileattr_get (struct dentry *dentry,struct file_kattr *fa); +extern int ntfs_fileattr_set (struct mnt_idmap *idmap,struct dentry *dentry, +struct file_kattr *fa); +extern const struct export_operations ntfs_export_ops;/*
Signature · 1 line
2.51.0
Namjae Jeon
maintainerRe: [PATCH 1/2] ntfs: implement fileattr_get and fileattr_set
Quoted 15 lines · Baolin Liu
From: Baolin Liu <[email protected]>
Wire up the fileattr inode operations so that lsattr(1) and chattr(1) work on ntfs.
fileattr_getreports the compressed and encrypted state of the attribute and the immutable and append-only flags, the same statesntfs_getattr()already reports through STATX_ATTR_*.
fileattr_setaccepts onlyFS_IMMUTABLE_FLandFS_APPEND_FL. Compression and encryption are rejected because changing them would require rewriting the attribute data. Both accepted flags go toinode->i_flags, so the VFS enforces them.
Quoted 5 lines
Neither flag has an on-disk representation of its own, so a value set through
fileattr_setonly lives for the lifetime of the mount. Note also thatS_IMMUTABLEis re-derived on every mount, fromFILE_ATTR_SYSTEMwhen mounted withsys_immutableand unconditionally for system files, so clearing it on such a file does not survive a remount either.
NTFS forces S_IMMUTABLE on system metadata files such as $MFT, but this patch allows userspace to clear that protection. The patch should reject clearing immutable for these files and for files made immutable by the sys_immutable mount option.
Re: [PATCH 1/2] ntfs: implement fileattr_get and fileattr_set
Quoted 21 lines · Namjae Jeon
Quoted 15 lines · Baolin Liu
From: Baolin Liu <[email protected]>
Wire up the fileattr inode operations so that lsattr(1) and chattr(1) work on ntfs.
fileattr_getreports the compressed and encrypted state of the attribute and the immutable and append-only flags, the same statesntfs_getattr()already reports through STATX_ATTR_*.
fileattr_setaccepts onlyFS_IMMUTABLE_FLandFS_APPEND_FL. Compression and encryption are rejected because changing them would require rewriting the attribute data. Both accepted flags go toinode->i_flags, so the VFS enforces them.Quoted 5 lines
Neither flag has an on-disk representation of its own, so a value set through
fileattr_setonly lives for the lifetime of the mount. Note also thatS_IMMUTABLEis re-derived on every mount, fromFILE_ATTR_SYSTEMwhen mounted withsys_immutableand unconditionally for system files, so clearing it on such a file does not survive a remount either.
Quoted 4 lines
NTFS forces
S_IMMUTABLEon system metadata files such as $MFT, but this patch allows userspace to clear that protection. The patch should reject clearing immutable for these files and for files made immutable by thesys_immutablemount option.
Hi Namjae,
You are right, that is a hole. The driver forces S_IMMUTABLE on those files for a reason and userspace should not be able to clear it.
I will add the check and send a v2.
Thanks for the review.
Thanks,
Baolin
Hyunchul Lee
maintainerRe: [PATCH 1/2] ntfs: implement fileattr_get and fileattr_set
In reply to Baolin LiuHi Baolin,
Quoted 9 lines
fs/ntfs/file.c +9
-0+/* +* ntfs_fileattr_get - inode_operations::fileattr_get +* @dentry: dentry to report the flags of +* @fa: filled in with the flags of @dentry +*/ +int ntfs_fileattr_get (struct dentry *dentry,struct file_kattr *fa) +{ +struct inode *vi =d_inode (dentry); +struct ntfs_inode *ni =NTFS_I (vi);
fs/ntfs/file.c static int ntfs_file_release(struct inode *vi, struct file *filp) · line 157
Quoted 10 lines
fs/ntfs/file.c +10
-0+u32 flags =0 ; + +if (NInoCompressed (ni) ||NInoWofCompressed (ni)) + flags |=FS_COMPR_FL ; +if (NInoEncrypted (ni)) + flags |=FS_ENCRYPT_FL ; +if (vi->i_flags &S_IMMUTABLE ) + flags |=FS_IMMUTABLE_FL ; +if (vi->i_flags &S_APPEND ) + flags |=FS_APPEND_FL ;
It would be better to set FS_CASEFOLD_FL as well.
Quoted 13 lines
fs/ntfs/file.c +12
-0+int ntfs_fileattr_set (struct mnt_idmap *idmap,struct dentry *dentry, +struct file_kattr *fa) +{ +struct inode *vi =d_inode (dentry); +unsigned int new_fl =0 ; + +if (fileattr_has_fsx (fa)) +return -EOPNOTSUPP ; +if (fa->flags & ~(FS_IMMUTABLE_FL |FS_APPEND_FL )) +return -EOPNOTSUPP ; + +if (fa->flags &FS_IMMUTABLE_FL )
fs/ntfs/file.c static int ntfs_file_release(struct inode *vi, struct file *filp) · line 190
Quoted 10 lines
fs/ntfs/file.c +10
-0+ new_fl |=S_IMMUTABLE ; +if (fa->flags &FS_APPEND_FL ) + new_fl |=S_APPEND ; + +inode_set_flags (vi, new_fl,S_IMMUTABLE |S_APPEND ); + +inode_set_ctime_current (vi); +mark_inode_dirty (vi); +return 0 ; +}
Currently, these flags are not written to disk.
I think that we should store them to disk or
reject them.
Signature · 2 lines
Thanks, Hyunchul
Re: [PATCH 1/2] ntfs: implement fileattr_get and fileattr_set
Quoted 35 lines · Hyunchul Lee
Hi Baolin,
Quoted 9 lines
fs/ntfs/file.c +9
-0+/* +* ntfs_fileattr_get - inode_operations::fileattr_get +* @dentry: dentry to report the flags of +* @fa: filled in with the flags of @dentry +*/ +int ntfs_fileattr_get (struct dentry *dentry,struct file_kattr *fa) +{ +struct inode *vi =d_inode (dentry); +struct ntfs_inode *ni =NTFS_I (vi);fs/ntfs/file.c static int ntfs_file_release(struct inode *vi, struct file *filp) · line 157
Quoted 10 lines
fs/ntfs/file.c +10
-0+u32 flags =0 ; + +if (NInoCompressed (ni) ||NInoWofCompressed (ni)) + flags |=FS_COMPR_FL ; +if (NInoEncrypted (ni)) + flags |=FS_ENCRYPT_FL ; +if (vi->i_flags &S_IMMUTABLE ) + flags |=FS_IMMUTABLE_FL ; +if (vi->i_flags &S_APPEND ) + flags |=FS_APPEND_FL ;It would be better to set
FS_CASEFOLD_FLas well.Quoted 10 lines
fs/ntfs/file.c +10
-0+int ntfs_fileattr_set (struct mnt_idmap *idmap,struct dentry *dentry, +struct file_kattr *fa) +{ +struct inode *vi =d_inode (dentry); +unsigned int new_fl =0 ; + +if (fileattr_has_fsx (fa)) +return -EOPNOTSUPP ; +if (fa->flags & ~(FS_IMMUTABLE_FL |FS_APPEND_FL )) +return -EOPNOTSUPP ;
Quoted 17 lines
fs/ntfs/file.c static int ntfs_file_release(struct inode *vi, struct file *filp) · line 190
Quoted 12 lines
fs/ntfs/file.c +12
-0+ +if (fa->flags &FS_IMMUTABLE_FL ) + new_fl |=S_IMMUTABLE ; +if (fa->flags &FS_APPEND_FL ) + new_fl |=S_APPEND ; + +inode_set_flags (vi, new_fl,S_IMMUTABLE |S_APPEND ); + +inode_set_ctime_current (vi); +mark_inode_dirty (vi); +return 0 ; +}Currently, these flags are not written to disk.
I think that we should store them to disk or
reject them.
Hi Hyunchul,
I will add FS_CASEFOLD_FL.
You are right about persistence. Namjae also pointed out that inode reclaim can drop these flags before an unmount. I will look into storing them on disk.
Thanks for the review.
Thanks,
Baolin
PATCH 2/2 ntfs: support the nodump flag
In reply to Baolin LiuFrom: Baolin Liu <[email protected]>
Add FS_NODUMP_FL to the flags fileattr_set accepts, so that chattr +d works, and report it back from both fileattr_get and ntfs_getattr(), the latter as STATX_ATTR_NODUMP.
The flag is advisory: it only tells backup tools such as dump(8) to skip the file, so the driver merely has to remember it. NTFS has no on-disk attribute for it, so it is kept in a new ntfs_inode field and lives for the lifetime of the mount. ntfs3 does the same.
--- fs/ntfs/file.c | 11 +++++++++-- fs/ntfs/inode.c | 1 + fs/ntfs/inode.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-)
fs/ntfs/file.c +9 -2
@@ -155,6 +155,8 @@ int ntfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) flags |=FS_IMMUTABLE_FL ;if (vi->i_flags &S_APPEND ) flags |=FS_APPEND_FL ; +if (ni->nodump) + flags |=FS_NODUMP_FL ;fileattr_fill_flags (fa, flags);return 0 ;
@@ -174,7 +176,7 @@ int ntfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry,if (fileattr_has_fsx (fa))return -EOPNOTSUPP ; -if (fa->flags & ~(FS_IMMUTABLE_FL |FS_APPEND_FL )) +if (fa->flags & ~(FS_IMMUTABLE_FL |FS_APPEND_FL |FS_NODUMP_FL ))return -EOPNOTSUPP ;if (fa->flags &FS_IMMUTABLE_FL )
@@ -183,6 +185,7 @@ int ntfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry, new_fl |=S_APPEND ;inode_set_flags (vi, new_fl,S_IMMUTABLE |S_APPEND ); +NTFS_I (vi)->nodump = fa->flags &FS_NODUMP_FL ;inode_set_ctime_current (vi);mark_inode_dirty (vi);
@@ -445,8 +448,12 @@ int ntfs_getattr(struct mnt_idmap *idmap, const struct path *path,if (inode->i_flags &S_APPEND ) stat->attributes |=STATX_ATTR_APPEND ; +if (ni->nodump) + stat->attributes |=STATX_ATTR_NODUMP ; + stat->attributes_mask |=STATX_ATTR_COMPRESSED |STATX_ATTR_ENCRYPTED | -STATX_ATTR_IMMUTABLE |STATX_ATTR_APPEND ; +STATX_ATTR_IMMUTABLE |STATX_ATTR_APPEND | +STATX_ATTR_NODUMP ;/* * If it's a compressed or encrypted file, NTFS currently
fs/ntfs/inode.c +1 -0
@@ -492,6 +492,7 @@ void __ntfs_init_inode(struct super_block *sb, struct ntfs_inode *ni) ni->reparse_tag =0 ; ni->reparse_flags =0 ; ni->target =NULL ; + ni->nodump =0 ; ni->i_dealloc_clusters =0 ; }
fs/ntfs/inode.h +1 -0
@@ -145,6 +145,7 @@ struct ntfs_inode {__le32 reparse_tag;__le32 reparse_flags;char *target; +bool nodump; };/*
Signature · 1 line
2.51.0
Namjae Jeon
maintainerQuoted 12 lines · Baolin Liu
From: Baolin Liu <[email protected]>
This series implements
fileattr_getandfileattr_setfor ntfs so that lsattr(1) and chattr(1) work on ntfs.Patch 1 wires up the fileattr inode operations and implements support for
FS_IMMUTABLE_FLandFS_APPEND_FL. These flags map toinode->i_flags(S_IMMUTABLE,S_APPEND), so the VFS enforces them.fileattr_getalso reports the compressed and encrypted state, which the driver already exposes through STATX_ATTR_* inntfs_getattr().
Quoted 7 lines
Patch 2 adds
FS_NODUMP_FLsupport, which dump(8) and other backup tools use to mark files to skip. The flag is stored in a newntfs_inodefield and reported through bothfileattr_get(for lsattr) andntfs_getattr()(asSTATX_ATTR_NODUMP, for statx), so the two interfaces stay consistent.All three accepted flags (immutable, append-only, nodump) are kept in memory and do not survive a remount, matching ntfs3 behavior.
This patch-set does not persist these flags on disk. So, the settings survive only while the corresponding inode remains cached. inode reclaim caused by memory pressure or drop_caches can discard them before unmount. Could you find a way to persist immutable, append, and nodump in metadata without causing compatibility issues?
Quoted 18 lines · Namjae Jeon
Quoted 17 lines · Baolin Liu
From: Baolin Liu <[email protected]>
This series implements
fileattr_getandfileattr_setfor ntfs so that lsattr(1) and chattr(1) work on ntfs.Patch 1 wires up the fileattr inode operations and implements support for
FS_IMMUTABLE_FLandFS_APPEND_FL. These flags map toinode->i_flags(S_IMMUTABLE,S_APPEND), so the VFS enforces them.fileattr_getalso reports the compressed and encrypted state, which the driver already exposes through STATX_ATTR_* inntfs_getattr().Patch 2 adds
FS_NODUMP_FLsupport, which dump(8) and other backup tools use to mark files to skip. The flag is stored in a newntfs_inodefield and reported through bothfileattr_get(for lsattr) andntfs_getattr()(asSTATX_ATTR_NODUMP, for statx), so the two interfaces stay consistent.
Quoted 7 lines
Quoted 2 lines
All three accepted flags (immutable, append-only, nodump) are kept in memory and do not survive a remount, matching ntfs3 behavior.
This patch-set does not persist these flags on disk. So, the settings survive only while the corresponding inode remains cached. inode reclaim caused by memory pressure or
drop_cachescan discard them before unmount. Could you find a way to persist immutable, append, and nodump in metadata without causing compatibility issues?
Hi Namjae,
You are right about inode reclaim, I had not considered that - not just a remount, memory pressure or drop_caches can silently drop these flags as well.
I will look into how to persist them without breaking compatibility.
Thanks for the review.
Thanks,
Baolin
Quoted 18 lines · Namjae Jeon
Quoted 17 lines · Baolin Liu
From: Baolin Liu <[email protected]>
This series implements
fileattr_getandfileattr_setfor ntfs so that lsattr(1) and chattr(1) work on ntfs.Patch 1 wires up the fileattr inode operations and implements support for
FS_IMMUTABLE_FLandFS_APPEND_FL. These flags map toinode->i_flags(S_IMMUTABLE,S_APPEND), so the VFS enforces them.fileattr_getalso reports the compressed and encrypted state, which the driver already exposes through STATX_ATTR_* inntfs_getattr().Patch 2 adds
FS_NODUMP_FLsupport, which dump(8) and other backup tools use to mark files to skip. The flag is stored in a newntfs_inodefield and reported through bothfileattr_get(for lsattr) andntfs_getattr()(asSTATX_ATTR_NODUMP, for statx), so the two interfaces stay consistent.
Quoted 7 lines
Quoted 2 lines
All three accepted flags (immutable, append-only, nodump) are kept in memory and do not survive a remount, matching ntfs3 behavior.
This patch-set does not persist these flags on disk. So, the settings survive only while the corresponding inode remains cached. inode reclaim caused by memory pressure or
drop_cachescan discard them before unmount. Could you find a way to persist immutable, append, and nodump in metadata without causing compatibility issues?
Hi Namjae,Hyunchul,
Regarding the persistence concern, I propose storing the
Linux-specific flags in one private EA entry in the file's existing NTFS $EA attribute:
EA name: $LXFLAGS
EA value: a 32-bit little-endian bitmask
bit 0: immutable
bit 1: append-only
bit 2: nodump
The three flags are boolean states, so one bit is sufficient for each
of them. Using one 32-bit value also leaves room for future expansion.
This would add an EA entry named $LXFLAGS to the existing $EA
attribute;it would not introduce a new NTFS attribute type. The driver already uses the standard $EA/$EA_INFORMATION mechanism for $LXUID, $LXGID, $LXMOD and $LXDEV, so this approach would reuse the existing on-disk mechanism.
The inode loading path would restore the flags from $LXFLAGS, andfileattr_set() would update the entry. The entry would be removed when all three flags are cleared. This would allow the flags to survive inode reclaim, drop_caches, unmount/remount, and reboot.
This approach would not require changes to mkntfs or to the NTFS
filesystem format.
Would this approach be acceptable? If so, I will implement it and
submit a new revision as soon as possible.
Thanks,
Baolin.
Namjae Jeon
maintainerQuoted 57 lines · liubaolin
Quoted 18 lines · Namjae Jeon
Quoted 17 lines · Baolin Liu
From: Baolin Liu <[email protected]>
This series implements
fileattr_getandfileattr_setfor ntfs so that lsattr(1) and chattr(1) work on ntfs.Patch 1 wires up the fileattr inode operations and implements support for
FS_IMMUTABLE_FLandFS_APPEND_FL. These flags map toinode->i_flags(S_IMMUTABLE,S_APPEND), so the VFS enforces them.fileattr_getalso reports the compressed and encrypted state, which the driver already exposes through STATX_ATTR_* inntfs_getattr().Patch 2 adds
FS_NODUMP_FLsupport, which dump(8) and other backup tools use to mark files to skip. The flag is stored in a newntfs_inodefield and reported through bothfileattr_get(for lsattr) andntfs_getattr()(asSTATX_ATTR_NODUMP, for statx), so the two interfaces stay consistent.Quoted 7 lines
Quoted 2 lines
All three accepted flags (immutable, append-only, nodump) are kept in memory and do not survive a remount, matching ntfs3 behavior.
This patch-set does not persist these flags on disk. So, the settings survive only while the corresponding inode remains cached. inode reclaim caused by memory pressure or
drop_cachescan discard them before unmount. Could you find a way to persist immutable, append, and nodump in metadata without causing compatibility issues?Hi Namjae,Hyunchul,
Regarding the persistence concern, I propose storing the
Linux-specific flags in one private EA entry in the file's existing NTFS $EA attribute:EA name: $LXFLAGS
EA value: a 32-bit little-endian bitmaskbit 0: immutable
bit 1: append-only
bit 2: nodumpThe three flags are boolean states, so one bit is sufficient for each
of them. Using one 32-bit value also leaves room for future expansion.This would add an EA entry named $LXFLAGS to the existing $EA
attribute;it would not introduce a new NTFS attribute type. The driver already uses the standard $EA/$EA_INFORMATION mechanism for $LXUID, $LXGID, $LXMOD and $LXDEV, so this approach would reuse the existing on-disk mechanism.The inode loading path would restore the flags from $LXFLAGS, and
fileattr_set()would update the entry. The entry would be removed when all three flags are cleared. This would allow the flags to survive inode reclaim,drop_caches, unmount/remount, and reboot.
Quoted 5 lines
This approach would not require changes to mkntfs or to the NTFS
filesystem format.Would this approach be acceptable? If so, I will implement it and
submit a new revision as soon as possible.
Could you please check whether Windows CHKDSK or the Windows NTFS modifies or deletes this EA? If neither modifies nor deletes it, please implement the proposed approach.
Thanks.