Re: a link issue maybe introduced in a bug fix " Don't let NFS cache stat after writes"

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

 



Hi,

>>> In which protocol are you seeing this issue? Fuse/NFS/SMB?

It is fuse, within mountpoint by “mount -t glusterfs  …“ command.

 

Thanks & Best Regards,

George

 

From: gluster-devel-bounces@xxxxxxxxxxx [mailto:gluster-devel-bounces@xxxxxxxxxxx] On Behalf Of Pranith Kumar Karampuri
Sent: Wednesday, January 10, 2018 8:08 PM
To: Lian, George (NSB - CN/Hangzhou) <george.lian@xxxxxxxxxxxxxxx>
Cc: Zhou, Cynthia (NSB - CN/Hangzhou) <cynthia.zhou@xxxxxxxxxxxxxxx>; Zhong, Hua (NSB - CN/Hangzhou) <hua.zhong@xxxxxxxxxxxxxxx>; Li, Deqian (NSB - CN/Hangzhou) <deqian.li@xxxxxxxxxxxxxxx>; Gluster-devel@xxxxxxxxxxx; Sun, Ping (NSB - CN/Hangzhou) <ping.sun@xxxxxxxxxxxxxxx>
Subject: Re: [Gluster-devel] a link issue maybe introduced in a bug fix " Don't let NFS cache stat after writes"

 

 

 

On Wed, Jan 10, 2018 at 11:09 AM, Lian, George (NSB - CN/Hangzhou) <george.lian@xxxxxxxxxxxxxxx> wrote:

Hi, Pranith Kumar,

 

I has create a bug on Bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1531457

After my investigation for this link issue, I suppose your changes on afr-dir-write.c with issue " Don't let NFS cache stat after writes" , your fix is like:

--------------------------------------

       if (afr_txn_nothing_failed (frame, this)) {

                        /*if it did pre-op, it will do post-op changing ctime*/

                        if (priv->consistent_metadata &&

                            afr_needs_changelog_update (local))

                                afr_zero_fill_stat (local);

                        local->transaction.unwind (frame, this);

                }

In the above fix, it set the ia_nlink to 0 if option consistent-metadata is set to on.

And hard link a file with which just created will lead to an error, and the error is caused in kernel function vfs_link:

if (inode->i_nlink == 0 && !(inode->i_state & I_LINKABLE))

             error =  -ENOENT;

 

could you please have a check and give some comments here?

 

When stat is "zero filled", understanding is that the higher layer protocol doesn't send stat value to the kernel and a separate lookup is sent by the kernel to get the latest stat value. In which protocol are you seeing this issue? Fuse/NFS/SMB?

 

 

Thanks & Best Regards,

George




--

Pranith

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux