RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-18 Thread Jianyong Wu
> -Original Message- > From: Dominique Martinet > Sent: Friday, September 18, 2020 5:35 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Justin He > ; Greg Kurz > Subject: Re:

Re: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-18 Thread Dominique Martinet
Jianyong Wu wrote on Fri, Sep 18, 2020: > If we move the counter decrease code into p9_client_clunk and put it > instead of fid_atomic_dec, we need delete fid off the inode where it > stores in p9_client_clunk. > But there is no way can we acquire the inode in p9_client_clunk. Do > you have any ide

RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-18 Thread Jianyong Wu
Subject: Re: [PATCH RFC 4/4] 9p: fix race issue in fid contention. > > Jianyong Wu wrote on Mon, Sep 14, 2020: > > > Not having exceptions for that will also make the code around > > > fid_atomic_dec much simpler: just have clunk do an atomic dec and > > > only do th

RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-14 Thread Jianyong Wu
Subject: Re: [PATCH RFC 4/4] 9p: fix race issue in fid contention. > > Jianyong Wu wrote on Mon, Sep 14, 2020: > > > Not having exceptions for that will also make the code around > > > fid_atomic_dec much simpler: just have clunk do an atomic dec and > > > only do th

Re: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-14 Thread Dominique Martinet
Jianyong Wu wrote on Mon, Sep 14, 2020: > > Not having exceptions for that will also make the code around > > fid_atomic_dec much simpler: just have clunk do an atomic dec and only do > > the actual clunk if that hit zero, and we should be able to get rid of that > > helper? > > Sorry, I think alw

RE: [V9fs-developer] [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-14 Thread Jianyong Wu
> Subject: Re: [V9fs-developer] [PATCH RFC 4/4] 9p: fix race issue in fid > contention. > > Dominique Martinet wrote on Mon, Sep 14, 2020: > > Jianyong Wu wrote on Mon, Sep 14, 2020: > > - Ideally base yourself of my 9p-test branch to have async clunk: > > https://githu

RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-14 Thread Jianyong Wu
Subject: Re: [PATCH RFC 4/4] 9p: fix race issue in fid contention. > > > Thanks for having a look a this! > > Jianyong Wu wrote on Mon, Sep 14, 2020: > > Eric's and Greg's patch offer a mechanism to fix open-unlink-f*syscall > > bug in 9p. But there is race is

Re: [V9fs-developer] [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-13 Thread Dominique Martinet
Dominique Martinet wrote on Mon, Sep 14, 2020: > Jianyong Wu wrote on Mon, Sep 14, 2020: > - Ideally base yourself of my 9p-test branch to have async clunk: > https://github.com/martinetd/linux/commits/9p-test > I've been promising to push it to next this week™ for a couple of weeks > but if somet

Re: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-13 Thread Dominique Martinet
Thanks for having a look a this! Jianyong Wu wrote on Mon, Sep 14, 2020: > Eric's and Greg's patch offer a mechanism to fix open-unlink-f*syscall > bug in 9p. But there is race issue in fid comtention. > As Greg's patch stores all of fids from opened files into according inode, > so all the look

[PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-13 Thread Jianyong Wu
Eric's and Greg's patch offer a mechanism to fix open-unlink-f*syscall bug in 9p. But there is race issue in fid comtention. As Greg's patch stores all of fids from opened files into according inode, so all the lookup fid ops can retrieve fid from inode preferentially. But there is no mechanism to