lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20250505142945.GJ1035866@frogsfrogsfrogs> Date: Mon, 5 May 2025 07:29:45 -0700 From: "Darrick J. Wong" <djwong@...nel.org> To: Christoph Hellwig <hch@....de> Cc: Zhang Yi <yi.zhang@...weicloud.com>, linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org, linux-block@...r.kernel.org, dm-devel@...ts.linux.dev, linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org, linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org, tytso@....edu, john.g.garry@...cle.com, bmarzins@...hat.com, chaitanyak@...dia.com, shinichiro.kawasaki@....com, brauner@...nel.org, yi.zhang@...wei.com, chengzhihao1@...wei.com, yukuai3@...wei.com, yangerkun@...wei.com Subject: Re: [RFC PATCH v4 07/11] fs: statx add write zeroes unmap attribute On Mon, May 05, 2025 at 03:22:08PM +0200, Christoph Hellwig wrote: > On Mon, Apr 21, 2025 at 10:15:05AM +0800, Zhang Yi wrote: > > From: Zhang Yi <yi.zhang@...wei.com> > > > > Add a new attribute flag to statx to determine whether a bdev or a file > > supports the unmap write zeroes command. > > > > Signed-off-by: Zhang Yi <yi.zhang@...wei.com> > > --- > > block/bdev.c | 4 ++++ > > fs/ext4/inode.c | 9 ++++++--- > > include/uapi/linux/stat.h | 1 + > > 3 files changed, 11 insertions(+), 3 deletions(-) > > > > diff --git a/block/bdev.c b/block/bdev.c > > index 4844d1e27b6f..29b0e5feb138 100644 > > --- a/block/bdev.c > > +++ b/block/bdev.c > > @@ -1304,6 +1304,10 @@ void bdev_statx(struct path *path, struct kstat *stat, > > queue_atomic_write_unit_max_bytes(bd_queue)); > > } > > > > + if (bdev_write_zeroes_unmap(bdev)) > > + stat->attributes |= STATX_ATTR_WRITE_ZEROES_UNMAP; > > + stat->attributes_mask |= STATX_ATTR_WRITE_ZEROES_UNMAP; > > Hmm, shouldn't this always be set by stat? But I might just be > really confused what attributes_mask is, and might in fact have > misapplied it in past patches of my own.. attributes_mask contains attribute flags known to the filesystem, whereas attributes contains flags actually set on the file. "known_attributes" would have been a better name, but that's water under the bridge. :P > Also shouldn't the patches to report the flag go into the bdev/ext4 > patches that actually implement the feature for the respective files > to keep bisectability? /I/ think so... --D
Powered by blists - more mailing lists