Bug 1623317 - posix_mknod does not update trusted.pgfid.xx xattr correctly
Summary: posix_mknod does not update trusted.pgfid.xx xattr correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: 4.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nithya Balachandran
QA Contact:
URL:
Whiteboard:
Depends On: 1619720
Blocks: 1619623 1620765
TreeView+ depends on / blocked
 
Reported: 2018-08-29 03:33 UTC by Nithya Balachandran
Modified: 2019-05-11 11:45 UTC (History)
2 users (show)

Fixed In Version: glusterfs-4.1.10
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1619720
Environment:
Last Closed: 2019-05-11 11:45:16 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Nithya Balachandran 2018-08-29 03:33: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:
1.
2.
3.

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> 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>

Comment 1 Worker Ant 2018-08-29 03:42:17 UTC
REVIEW: https://review.gluster.org/21028 (storage/posix: Increment trusted.pgfid in posix_mknod) posted (#1) for review on release-4.1 by N Balachandran

Comment 2 Worker Ant 2018-09-06 14:42:58 UTC
COMMIT: https://review.gluster.org/21028 committed in release-4.1 by "N Balachandran" <nbalacha> 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#1623317
Signed-off-by: N Balachandran <nbalacha>


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