Re: [PATCH v4 3/6] xfs: implement write-stream management support

Christoph Hellwig <[email protected]>
Newsgroups org.kernel.vger.linux-xfs,org.kernel.vger.linux-block,org.kernel.vger.linux-fsdevel
Message-ID <[email protected]>
On Fri, Jul 31, 2026 at 01:33:04PM +0530, Kanchan Joshi wrote:
> On 7/21/2026 8:38 AM, Darrick J. Wong wrote:
> >> Write streams, filestreams, and write-life-time hints are mutually exclusive;
> >> combining any two of them returns -EINVAL:
> >>    - GET_MAX reports 0 whenever xfs_inode_is_filestream() is true,
> >>      covering both mount-wide filestreams and the per-inode chattr
> >>      flag. Also when the file is on the realtime device.
> >>    - SET refuses to bind a stream to a file that already has a
> >>      write-life-time hint (fcntl F_SET_RW_HINT), is filestream, or is
> >>      on the realtime device.
> >>    - chattr refuses to set the filestream or realtime flag on a file
> >>      that already has a write stream set.
> > These special "files" that represent stream ids could be generic code
> > instaed of in xfs.  AFAICT the only thing you need from xfs is a pointer
> > from struct xfs_inode to struct (xfs_)write_stream, right?
> 
> Right. Is it fine if we come to it when everything else is settled.
> I was hoping to lift common things up when write-stream is applied on 
> another FS.

Yes, I think this really needs to move to common code.  If we can find
a hole in struct inode, moving the write_stream id to that would probably
clean that up a lot.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.