Re: [PATCH] fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed

From: Dominique Martinet
Date: Wed Jul 25 2018 - 00:06:19 EST


piaojun wrote on Wed, Jul 25, 2018:
> On 2018/7/25 11:32, Dominique Martinet wrote:
> >> p9_client_write(fid, 0, &from, &retval);
> >
> > I'm not sure what to do about this but it's also possible for
> > p9_client_write to not write the full length without setting and error.
> >
> > We should probably compare the return value of p9_client_write and
> > value_len to detect short writes and return an error in this case.
>
> It looks like we could identify short writes error from the *err. If no
> error case breaks the while loop, the total equal to the whole data len.

Ah, I looked too fast and missed the while loop in p9_client_write...
It's rather unusual for such a low level call to handle retries, but I
guess that's 9p.

Right, will take that patch as is then.

Thanks,
--
Dominique