Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-07 Thread Al Viro
On Mon, Mar 07, 2016 at 06:25:13AM -0500, Sage Weil wrote: > That looks okay, but changing d_rehash to d_add still means you're doing > te d_instantiate(dn, NULL) in the d_unhashed case; is there a reason you > changed that line? Is the dentry_rcuwalk_invalidate in __d_instantiate is >

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-07 Thread Al Viro
On Mon, Mar 07, 2016 at 06:25:13AM -0500, Sage Weil wrote: > That looks okay, but changing d_rehash to d_add still means you're doing > te d_instantiate(dn, NULL) in the d_unhashed case; is there a reason you > changed that line? Is the dentry_rcuwalk_invalidate in __d_instantiate is >

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-07 Thread Sage Weil
On Mon, 7 Mar 2016, Al Viro wrote: > On Wed, Mar 02, 2016 at 11:00:01AM +0800, Yan, Zheng wrote: > > > > This code dates back to when Ceph was originally upstreamed, so the > > > history is murky, but I expect at that point I wanted to avoid hashing in > > > the no-lease case. But I don't

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-07 Thread Sage Weil
On Mon, 7 Mar 2016, Al Viro wrote: > On Wed, Mar 02, 2016 at 11:00:01AM +0800, Yan, Zheng wrote: > > > > This code dates back to when Ceph was originally upstreamed, so the > > > history is murky, but I expect at that point I wanted to avoid hashing in > > > the no-lease case. But I don't

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-06 Thread Al Viro
On Wed, Mar 02, 2016 at 11:00:01AM +0800, Yan, Zheng wrote: > > This code dates back to when Ceph was originally upstreamed, so the > > history is murky, but I expect at that point I wanted to avoid hashing in > > the no-lease case. But I don't think it matters. We should just remove > > the

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-06 Thread Al Viro
On Wed, Mar 02, 2016 at 11:00:01AM +0800, Yan, Zheng wrote: > > This code dates back to when Ceph was originally upstreamed, so the > > history is murky, but I expect at that point I wanted to avoid hashing in > > the no-lease case. But I don't think it matters. We should just remove > > the

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-01 Thread Yan, Zheng
> On Mar 1, 2016, at 22:50, Sage Weil wrote: > > Hi Al, > > On Fri, 26 Feb 2016, Al Viro wrote: >> You have, modulo printks and BUG_ON(), >> { >>struct dentry *realdn; >>/* dn must be unhashed */ >>if (!d_unhashed(dn)) >>d_drop(dn); >>

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-01 Thread Yan, Zheng
> On Mar 1, 2016, at 22:50, Sage Weil wrote: > > Hi Al, > > On Fri, 26 Feb 2016, Al Viro wrote: >> You have, modulo printks and BUG_ON(), >> { >>struct dentry *realdn; >>/* dn must be unhashed */ >>if (!d_unhashed(dn)) >>d_drop(dn); >>realdn =

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-01 Thread Sage Weil
Hi Al, On Fri, 26 Feb 2016, Al Viro wrote: > You have, modulo printks and BUG_ON(), > { > struct dentry *realdn; > /* dn must be unhashed */ > if (!d_unhashed(dn)) > d_drop(dn); > realdn = d_splice_alias(in, dn); > if (IS_ERR(realdn)) { >

Re: [ceph] what's going on with d_rehash() in splice_dentry()?

2016-03-01 Thread Sage Weil
Hi Al, On Fri, 26 Feb 2016, Al Viro wrote: > You have, modulo printks and BUG_ON(), > { > struct dentry *realdn; > /* dn must be unhashed */ > if (!d_unhashed(dn)) > d_drop(dn); > realdn = d_splice_alias(in, dn); > if (IS_ERR(realdn)) { >

[ceph] what's going on with d_rehash() in splice_dentry()?

2016-02-26 Thread Al Viro
You have, modulo printks and BUG_ON(), { struct dentry *realdn; /* dn must be unhashed */ if (!d_unhashed(dn)) d_drop(dn); realdn = d_splice_alias(in, dn); if (IS_ERR(realdn)) { if (prehash) *prehash =

[ceph] what's going on with d_rehash() in splice_dentry()?

2016-02-26 Thread Al Viro
You have, modulo printks and BUG_ON(), { struct dentry *realdn; /* dn must be unhashed */ if (!d_unhashed(dn)) d_drop(dn); realdn = d_splice_alias(in, dn); if (IS_ERR(realdn)) { if (prehash) *prehash =