[Ocfs2-devel] [PATCH] ocfs2: fall back to buffer IO when append dio is disabled with file hole existing
Andrew Morton
akpm at linux-foundation.org
Mon Dec 18 17:27:39 PST 2017
On Tue, 19 Dec 2017 09:24:17 +0800 Joseph Qi <jiangqi903 at gmail.com> wrote:
> > --- a/fs/ocfs2/aops.c~ocfs2-fall-back-to-buffer-io-when-append-dio-is-disabled-with-file-hole-existing-fix
> > +++ a/fs/ocfs2/aops.c
> > @@ -2469,10 +2469,9 @@ static int ocfs2_dio_end_io(struct kiocb
> > * Will look for holes and unwritten extents in the range starting at
> > * pos for count bytes (inclusive).
> > */
> > -static int ocfs2_check_range_for_holes(struct inode *inode, loff_t pos,
> > - size_t count)
> > +static bool ocfs2_range_has_holes(struct inode *inode, loff_t pos, size_t count)
> > {
> > - int ret = 0;
> > + bool ret = false;
>
> I have a different opinion here. If we change return value from int to
> bool, the error returned by ocfs2_get_clusters cannot be reflected. So
> I'd prefer the original version.
But that error code is not used?
More information about the Ocfs2-devel
mailing list