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: <20250505132208.GA22182@lst.de> Date: Mon, 5 May 2025 15:22:08 +0200 From: Christoph Hellwig <hch@....de> To: Zhang Yi <yi.zhang@...weicloud.com> Cc: 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, hch@....de, tytso@....edu, djwong@...nel.org, 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, 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.. 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?
Powered by blists - more mailing lists