[Bugs] [Bug 1531457] hard Link file A to B error if A is just created

bugzilla at redhat.com bugzilla at redhat.com
Wed Jan 24 07:35:42 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1531457



--- Comment #5 from George <george.lian at nokia.com> ---
Who can tell me while need set buf->ia_nlink to “0”in function
gf_zero_fill_stat(), which API or Application will care it?
If I remove this line and also update corresponding in function
gf_is_zero_filled_stat, 
The issue seems gone, but I can’t confirm will lead to other issues.

So could anyone please double check it and give your comments here?

My change is as the below:

gf_boolean_t
gf_is_zero_filled_stat (struct iatt *buf)
{
        if (!buf)
                return 1;

        /* Do not use st_dev because it is transformed to store the xlator id
         * in place of the device number. Do not use st_ino because by this
time
         * we've already mapped the root ino to 1 so it is not guaranteed to be
         * 0.
         */
//        if ((buf->ia_nlink == 0) && (buf->ia_ctime == 0))
        if (buf->ia_ctime == 0 )
                return 1;

        return 0;
}

void
gf_zero_fill_stat (struct iatt *buf)
{
//       buf->ia_nlink = 0;
        buf->ia_ctime = 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list