Re: Question regarding CIFS cache=loose behavior.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 26 Mar 2014 23:05:20 +0900
Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:

> Jeffrey Layton wrote:
> > > ...or that samba is omitting it and is sending cached info
> > > instead of doing the lstat() call? I'm not sure if it does that,
> > > but I don't think you should draw too many conclusions about the
> > > behavior of cifs.ko from stracing smbd.
> > > 
> > > What may make more sense is to get network captures and analyze
> > > the behavior from that perspective.
> > > 
> > 
> > ...or maybe it *is* cifs.ko. From cifs_inode_needs_reval:
> > 
> > 
> >         if (!time_in_range(jiffies, cifs_i->time,
> >                                 cifs_i->time + cifs_sb->actimeo))
> >                 return true;
> > 
> > 
> > ...I think though that if cifs_i->time == jiffies and actimeo=0,
> > then that condition will be false. As a quick check, it might be
> > good to add something like this before that if statement and then
> > rerun your test:
> > 
> > 	if (!cifs_sb->actimeo)
> > 		return true;
> > 
> > That should get rid of that particular corner case.
> 
> Yes, I confirmed that below change fixes this problem. Thank you.
> 
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -1737,6 +1737,8 @@ cifs_inode_needs_reval(struct inode *inode)
>  	if (cifs_i->time == 0)
>  		return true;
>  
> +	if (!cifs_sb->actimeo)
> +		return true;
>  	if (!time_in_range(jiffies, cifs_i->time,
>  				cifs_i->time + cifs_sb->actimeo))
>  		return true;

Great, thanks for testing it. I'll send Steve a patch for 3.15 and cc
you.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux