Re: [Nfs-ganesha-devel] Ganesha 2.5 - mdc_readdir_chunk_object :INODE :CRIT :Collision while adding dirent for .nfsFD8E

2017-11-07 Thread Frank Filz
> cookie == 7fff == 2^31 looks maybe just a bit suspicious?

That's a common last cookie in a directory (remember, cookie is the
"address/offset" of the NEXT entry, so INT32_MAX is a nice value for that.

On call, it was indicated that other cookie values have been seen, so this
is not necessarily an end of directory situation.

Given that d_off (aka cookie) is always the offset of the next entry, it is
possible under a highly mutating directory to see a duplicate. Consider that
if the directory initially had the following entries:

Filea cookie 0x131 (which happens to hash to 0x123 and thus the file before
it had cookie 0x123)
Filec cookie 0x7fff (which happens to hash to 0x131, thus the cookie
0x131 for Fileas)

Now we do a getdents and get back Filea cookie 0x131.

Then before we call getdents again, Fileb is created, it happens to hash to
0x127 and gets inserted between Filea and Filec (so if we re-read Filea's
dirent, it would now have cookie 0x127). Fileb's dirent gets cookie 0x131.

Now we call getdents, and get Fileb cookie 0x131...

One solution would be for FSALs to do what I did in FSAL_VFS for testing
compute_cookie. Instead of passing up the d_off of the entry as the cookie,
pass the d_off of the previous entry, which happens to be the offset of this
entry. That does mean when resuming a directory, we will fetch the entry we
already have, and need to skip it, but it means each file has a constant
cookie (and then you never have cookie 0x7fff, unless you genuinely have
an entry that hashes to that...).

Frank

> Matt
> 
> On Tue, Nov 7, 2017 at 10:14 AM, Sachin Punadikar
>  wrote:
> > Hello,
> > During tests on Ganesha 2.5, we are getting below logs with the
> > critical
> > message:
> > 2017-11-03 05:30:05 : epoch 000100d3 : c40abc1pn13.gpfs.net :
> > ganesha.nfsd-36297[work-226] mdcache_avl_insert_ck :INODE :WARN
> > :Already existent when inserting dirent 0x3ffbe8015a60 for .nfsFD8E on
> > entry=0x3ffb08019ed0 FSAL cookie=7fff, duplicated directory
> > cookies make READDIR unreliable.
> > 2017-11-03 05:30:05 : epoch 000100d3 : c40abc1pn13.gpfs.net :
> > ganesha.nfsd-36297[work-226] mdc_readdir_chunk_object :INODE :CRIT
> > :Collision while adding dirent for .nfsFD8E
> >
> > Would like to understand what exactly mean by FSAL cookie collision ?
> > Does it mean same operation has been done by UPCALL thread ? Is the
> > message really CRIT ?
> > If I compare with 2.3 code (I know there is lot of change related to
> > caching), there we are not throwing any CRIT message.
> >
> > --
> > with regards,
> > Sachin Punadikar
> >
> > --
> >  Check out the vibrant tech community on one of the world's
> > most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Nfs-ganesha-devel mailing list
> > Nfs-ganesha-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel
> >
> 
> 
> 
> --
> 
> Matt Benjamin
> Red Hat, Inc.
> 315 West Huron Street, Suite 140A
> Ann Arbor, Michigan 48103
> 
> http://www.redhat.com/en/technologies/storage
> 
> tel.  734-821-5101
> fax.  734-769-8938
> cel.  734-216-5309
> 
>

--
> Check out the vibrant tech community on one of the world's most engaging
> tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Nfs-ganesha-devel mailing list
> Nfs-ganesha-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


Re: [Nfs-ganesha-devel] Ganesha 2.5 - mdc_readdir_chunk_object :INODE :CRIT :Collision while adding dirent for .nfsFD8E

2017-11-07 Thread Matt Benjamin
cookie == 7fff == 2^31 looks maybe just a bit suspicious?

Matt

On Tue, Nov 7, 2017 at 10:14 AM, Sachin Punadikar
 wrote:
> Hello,
> During tests on Ganesha 2.5, we are getting below logs with the critical
> message:
> 2017-11-03 05:30:05 : epoch 000100d3 : c40abc1pn13.gpfs.net :
> ganesha.nfsd-36297[work-226] mdcache_avl_insert_ck :INODE :WARN :Already
> existent when inserting dirent 0x3ffbe8015a60 for .nfsFD8E on
> entry=0x3ffb08019ed0 FSAL cookie=7fff, duplicated directory cookies make
> READDIR unreliable.
> 2017-11-03 05:30:05 : epoch 000100d3 : c40abc1pn13.gpfs.net :
> ganesha.nfsd-36297[work-226] mdc_readdir_chunk_object :INODE :CRIT
> :Collision while adding dirent for .nfsFD8E
>
> Would like to understand what exactly mean by FSAL cookie collision ? Does
> it mean same operation has been done by UPCALL thread ? Is the message
> really CRIT ?
> If I compare with 2.3 code (I know there is lot of change related to
> caching), there we are not throwing any CRIT message.
>
> --
> with regards,
> Sachin Punadikar
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Nfs-ganesha-devel mailing list
> Nfs-ganesha-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel
>



-- 

Matt Benjamin
Red Hat, Inc.
315 West Huron Street, Suite 140A
Ann Arbor, Michigan 48103

http://www.redhat.com/en/technologies/storage

tel.  734-821-5101
fax.  734-769-8938
cel.  734-216-5309

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel


[Nfs-ganesha-devel] Ganesha 2.5 - mdc_readdir_chunk_object :INODE :CRIT :Collision while adding dirent for .nfsFD8E

2017-11-07 Thread Sachin Punadikar
Hello,
During tests on Ganesha 2.5, we are getting below logs with the critical
message:


*2017-11-03 05:30:05 : epoch 000100d3 : c40abc1pn13.gpfs.net
 : ganesha.nfsd-36297[work-226]
mdcache_avl_insert_ck :INODE :WARN :Already existent when inserting dirent
0x3ffbe8015a60 for .nfsFD8E on entry=0x3ffb08019ed0 FSAL cookie=7fff,
duplicated directory cookies make READDIR unreliable.2017-11-03 05:30:05 :
epoch 000100d3 : c40abc1pn13.gpfs.net  :
ganesha.nfsd-36297[work-226] mdc_readdir_chunk_object :INODE :CRIT
:Collision while adding dirent for .nfsFD8E*

Would like to understand what exactly mean by FSAL cookie collision ? Does
it mean same operation has been done by UPCALL thread ? Is the message
really CRIT ?
If I compare with 2.3 code (I know there is lot of change related to
caching), there we are not throwing any CRIT message.

-- 
with regards,
Sachin Punadikar
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel