Re: Supporting FALLOC_FL_WRITE_ZEROES in NFS4.2 with WRITE_SAME?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 18, 2025 at 9:01 AM Chuck Lever <chuck.lever@xxxxxxxxxx> wrote:
>
> On 3/18/25 11:09 AM, Anna Schumaker wrote:
> > Hi Takeshi,
> >
> > On 3/18/25 11:00 AM, Takeshi Nishimura wrote:
> >> Zhang Yi <yi.zhang@xxxxxxxxxx> wrote in linux-fsdevel@xxxxxxxxxxxxxxx:
> >>> Add support for FALLOC_FL_WRITE_ZEROES. This first allocates blocks as
> >>> unwritten, then issues a zero command outside of the running journal
> >>> handle, and finally converts them to a written state.
> >>
> >> Picking up where the NFS4.2 WRITE_SAME discussion stalled:
> >> FALLOC_FL_WRITE_ZEROES is coming, and IMO the only way to implement
> >> that for NFS is via WRITE_SAME.
> >>
> >> How to proceed?
> >
> > I've been working on patches for implementing FALLOC_FL_ZERO_RANGE support
> > in the NFS client using WRITE_SAME. I've also been experimenting with adding
> > an ioctl for the generic pattern writing part. I'm expecting to talk about
> > what I have for ioctl API at LSF next week, and I'll post an initial round
> > of patches shortly after.
> >
> > I do still need to think through any edge cases and write tests for
> > pynfs and fstests before anything can be merged.
>
> Takeshi, it would be immensely helpful to us if you could provide some
> detail about how exactly you intend to make use of WRITE_SAME so we can
> focus the development, review, and testing efforts.
>
> So far we don't have any specific use cases, but there is some
> skepticism (as voiced in the previous thread) about whether this
> facility will actually be useful.
Just fyi, there has been a similar discussion in FreeBSD land.
The main use case in FreeBSD land sounded like writing zeros for NVME,
if I followed it.

My impression is that the other patten stuff isn't very useful, since only some
(a few?) SCSI devices know how to do it.

The problem I see is that WRITE_SAME isn't defined in a way where the
NFSv4 server can only implement zero'ng and fail the rest.
As such. I am thinking that a new operation for NFSv4.2 that does writing
of zeros might be preferable to trying to (mis)use WROTE_SAME.

rick

>
> For example, do you expect to have SCSI devices that accelerate
> WRITE_SAME? How will your applications use this? What kind (and size)
> of patterns do you expect to need?
>
>
> --
> Chuck Lever
>





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux