Bug 1620765 - posix_mknod does not update trusted.pgfid.xx xattr correctly
Summary: posix_mknod does not update trusted.pgfid.xx xattr correctly
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: posix
Version: rhgs-3.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: RHGS 3.4.0
Assignee: Nithya Balachandran
QA Contact: Vinayak Papnoi
Depends On: 1619720 1623317
Blocks: 1503137 1619623
TreeView+ depends on / blocked
Reported: 2018-08-23 11:09 UTC by Nithya Balachandran
Modified: 2018-09-07 09:57 UTC (History)
11 users (show)

Fixed In Version: glusterfs-3.12.2-17
Doc Type: Bug Fix
Doc Text:
Previously, an incorrect value for the trusted.pgfid xattr on linkto files prevented them from being renamed during some file rename operations. This was seen on volumes with the storage.build-pgfid option enabled, which is enabled by glusterfind. As the name of the linkto file no longer matched that of the actual file, these files were no longer inaccessible if the lookup-optimize option was enabled on the volume.With this fix, the value of the xattr set on the linkto file allows the rename to proceed.
Clone Of: 1619720
Last Closed: 2018-09-04 06:52:17 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2607 None None None 2018-09-04 06:53:50 UTC

Description Nithya Balachandran 2018-08-23 11:09:01 UTC
+++ This bug was initially created as a clone of Bug #1619720 +++

Description of problem:

posix_mknod always sets the value of trusted.pgfid.xxx to 1. This works in most cases but is incorrect when posix_mknod calls posix_create_link_if_gfid_exists.

This leads to problems when renaming a file as the xattr is deleted and the subsequent posix_rename fails.

From the logs:

[2018-08-21 14:56:41.685906] W [MSGID: 113093] [posix-entry-ops.c:472:posix_mknod] 0-patchy-posix: setting xattr failed on /bricks/brick1/backends/patchy0/tmp/file-3: key = trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8  [File exists]
[2018-08-21 14:56:41.691156]:++++++++++ G_LOG:bugs/distribute/bug-rianovosti.t: TEST: 51 getfattr -n trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8 /bricks/brick1/backends/patchy0/tmp/file-3 ++++++++++
[2018-08-21 14:56:41.700318]:++++++++++ G_LOG:bugs/distribute/bug-rianovosti.t: TEST: 52 getfattr -n trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8 /bricks/brick1/backends/patchy1/tmp/file-3 ++++++++++
[2018-08-21 14:56:41.710943]:++++++++++ G_LOG:bugs/distribute/bug-rianovosti.t: TEST: 54 mv /mnt/glusterfs/0/tmp/file-3 /mnt/glusterfs/0/tmp/file-6 ++++++++++
[2018-08-21 14:56:41.721513] W [MSGID: 113093] [posix-entry-ops.c:1714:posix_rename] 0-patchy-posix: getting xattr failed on /bricks/brick1/backends/patchy0/tmp/file-3: key = trusted.pgfid.aa873350-56fd-4664-a822-6c96ec935ba8  [No data available]
[2018-08-21 14:56:41.721532] W [MSGID: 113001] [posix-entry-ops.c:1808:posix_rename] 0-patchy-posix: modification of parent gfid xattr failed (gfid:2cf7c436-f926-4cbb-90fa-b3dbd3ced4d1)
[2018-08-21 14:56:41.721558] I [MSGID: 115061] [server-rpc-fops_v2.c:957:server4_rename_cbk] 0-patchy-server: 70: RENAME /tmp/file-3 (aa873350-56fd-4664-a822-6c96ec935ba8/file-3) -> /tmp/file-6 (aa873350-56fd-4664-a822-6c96ec935ba8/file-6), client: CTX_ID:f2627781-b626-4f21-8298-42ed87f8556c-GRAPH_ID:0-PID:32112-HOST:rhgs313-6.localdomain-PC_NAME:patchy-client-0-RECON_NO:-0, error-xlator: patchy-posix [No data available]

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

--- Additional comment from Worker Ant on 2018-08-21 11:34:17 EDT ---

REVIEW: https://review.gluster.org/20875 (storage/posix: Increment trusted.pgfid in posix_mknod) posted (#1) for review on master by N Balachandran

--- Additional comment from Worker Ant on 2018-08-23 02:49:44 EDT ---

COMMIT: https://review.gluster.org/20875 committed in master by "Amar Tumballi" <amarts@redhat.com> with a commit message- storage/posix: Increment trusted.pgfid in posix_mknod

The value of trusted.pgfid.xx was always set to 1
in posix_mknod. This is incorrect if posix_mknod
calls posix_create_link_if_gfid_exists.

Change-Id: Ibe87ca6f155846b9a7c7abbfb1eb8b6a99a5eb68
fixes: bz#1619720
Signed-off-by: N Balachandran <nbalacha@redhat.com>

Comment 4 Sunil Kumar Acharya 2018-08-23 11:41:13 UTC
Upstream patch: https://review.gluster.org/20875

Comment 8 Srijita Mukherjee 2018-09-03 16:04:50 UTC
have updated the doc text. Kindly review and confirm

Comment 10 errata-xmlrpc 2018-09-04 06:52:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.