Message ID | 170175456779.3910588.8343836136719400292.stgit@frogsfrogsfrogs (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfs: elide defer work ->create_done if no intent | expand |
On Mon, Dec 04, 2023 at 09:36:07PM -0800, Darrick J. Wong wrote: > +/* > + * The "LARP" (Logged extended Attribute Recovery Persistence) debugging knob > + * sets the XFS_DA_OP_LOGGED flag on all xfs_attr_set operations performed on > + * V5 filesystems. As a result, the intermediate progress of all setxattr and > + * removexattr operations are tracked via the log and can be restarted during > + * recovery. > + */ Can you also add a sentence on why we even have this code and why you'd want to set the flag?
On Tue, Dec 05, 2023 at 06:38:42AM +0100, Christoph Hellwig wrote: > On Mon, Dec 04, 2023 at 09:36:07PM -0800, Darrick J. Wong wrote: > > +/* > > + * The "LARP" (Logged extended Attribute Recovery Persistence) debugging knob > > + * sets the XFS_DA_OP_LOGGED flag on all xfs_attr_set operations performed on > > + * V5 filesystems. As a result, the intermediate progress of all setxattr and > > + * removexattr operations are tracked via the log and can be restarted during > > + * recovery. > > + */ > > Can you also add a sentence on why we even have this code and why you'd > want to set the flag? How about these last couple of sentences? /* * The "LARP" (Logged extended Attribute Recovery Persistence) debugging knob * sets the XFS_DA_OP_LOGGED flag on all xfs_attr_set operations performed on * V5 filesystems. As a result, the intermediate progress of all setxattr and * removexattr operations are tracked via the log and can be restarted during * recovery. This is useful for testing xattr recovery prior to merging of the * parent pointer feature which requires it to maintain consistency, and may be * enabled for userspace xattrs in the future. */ --D
On Mon, Dec 04, 2023 at 09:50:28PM -0800, Darrick J. Wong wrote: > How about these last couple of sentences? > > /* > * The "LARP" (Logged extended Attribute Recovery Persistence) debugging knob > * sets the XFS_DA_OP_LOGGED flag on all xfs_attr_set operations performed on > * V5 filesystems. As a result, the intermediate progress of all setxattr and > * removexattr operations are tracked via the log and can be restarted during > * recovery. This is useful for testing xattr recovery prior to merging of the > * parent pointer feature which requires it to maintain consistency, and may be > * enabled for userspace xattrs in the future. > */ Oooh. So all the logged attrs work is preparation for parent pointers? That makes a whole lot of sense, but I've missed it so far. Yes, the above comment is great. With that: Reviewed-by: Christoph Hellwig <hch@lst.de>
On Tue, Dec 05, 2023 at 06:56:42AM +0100, Christoph Hellwig wrote: > On Mon, Dec 04, 2023 at 09:50:28PM -0800, Darrick J. Wong wrote: > > How about these last couple of sentences? > > > > /* > > * The "LARP" (Logged extended Attribute Recovery Persistence) debugging knob > > * sets the XFS_DA_OP_LOGGED flag on all xfs_attr_set operations performed on > > * V5 filesystems. As a result, the intermediate progress of all setxattr and > > * removexattr operations are tracked via the log and can be restarted during > > * recovery. This is useful for testing xattr recovery prior to merging of the > > * parent pointer feature which requires it to maintain consistency, and may be > > * enabled for userspace xattrs in the future. > > */ > > Oooh. So all the logged attrs work is preparation for parent pointers? > That makes a whole lot of sense, but I've missed it so far. Yes, the > above comment is great. Yep! And that's coming in the year end megapatchbomb. :) --D > With that: > > Reviewed-by: Christoph Hellwig <hch@lst.de> >
diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c index a3c6b1548723..59869a1ee49f 100644 --- a/fs/xfs/xfs_sysfs.c +++ b/fs/xfs/xfs_sysfs.c @@ -229,6 +229,13 @@ pwork_threads_show( } XFS_SYSFS_ATTR_RW(pwork_threads); +/* + * The "LARP" (Logged extended Attribute Recovery Persistence) debugging knob + * sets the XFS_DA_OP_LOGGED flag on all xfs_attr_set operations performed on + * V5 filesystems. As a result, the intermediate progress of all setxattr and + * removexattr operations are tracked via the log and can be restarted during + * recovery. + */ static ssize_t larp_store( struct kobject *kobject,