[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230523160217.GB15391@lst.de>
Date: Tue, 23 May 2023 18:02:17 +0200
From: Christoph Hellwig <hch@....de>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: Christoph Hellwig <hch@....de>,
Matthew Wilcox <willy@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Xiubo Li <xiubli@...hat.com>,
Ilya Dryomov <idryomov@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Theodore Ts'o <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>,
Miklos Szeredi <miklos@...redi.hu>,
Andreas Gruenbacher <agruenba@...hat.com>,
"Darrick J. Wong" <djwong@...nel.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-block@...r.kernel.org, ceph-devel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
"open list:F2FS FILE SYSTEM" <linux-f2fs-devel@...ts.sourceforge.net>,
cluster-devel@...hat.com, linux-xfs@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 07/13] iomap: update ki_pos in iomap_file_buffered_write
On Mon, May 22, 2023 at 09:01:05AM +0900, Damien Le Moal wrote:
> > - int ret;
> > + ssize_t ret;
> >
> > if (iocb->ki_flags & IOCB_NOWAIT)
> > iter.flags |= IOMAP_NOWAIT;
> >
> > while ((ret = iomap_iter(&iter, ops)) > 0)
> > iter.processed = iomap_write_iter(&iter, i);
> > - if (iter.pos == iocb->ki_pos)
> > +
> > + if (unlikely(ret < 0))
>
> Nit: This could be if (unlikely(ret <= 0)), no ?
No. iomap_iter does not return te amount of bytes written.
Powered by blists - more mailing lists