Bug 785524 - Fix posix rename gfid handle unsets
Fix posix rename gfid handle unsets
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: posix (Show other bugs)
pre-release
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pranith Kumar K
Raghavendra Bhat
:
Depends On:
Blocks: 817967
  Show dependency treegraph
 
Reported: 2012-01-29 05:49 EST by Pranith Kumar K
Modified: 2013-07-24 13:14 EDT (History)
2 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-24 13:14:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: glusterfs-3.3.0qa45
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pranith Kumar K 2012-01-29 05:49:59 EST
Description of problem:
 was_dir in not initialized to 0 so even when the path is file victim gfid handle is unset.
 victim gfid handle should be unset when nlink is 1 not 2.
Comment 1 Anand Avati 2012-01-30 02:31:22 EST
CHANGE: http://review.gluster.com/2698 (storage/posix: Fix rename gfid handle unset) merged in master by Anand Avati (avati@gluster.com)
Comment 2 Raghavendra Bhat 2012-06-04 06:08:59 EDT
Checked with glusterfs-3.3.0qa45 and now when mv b a is done, that the gfid handle related to a is unset and the gfid based backend does not contain the handle related to a's gfid.



mnt/sda7/export3/b
trusted.gfid=0xfc76b58cecd44d5aaa1a159e01bbd8cf
trusted.glusterfs.3382aaa7-37d0-4fab-bd3c-dc9a7a350acf.xtime=0x4fcc887c0002467d
trusted.glusterfs.quota.00000000-0000-0000-0000-000000000001.contri=0x0000000000000000

root@hyperspace:/mnt/client# ls /mnt/sda7/export3/.glusterfs/e8/64/
e864fd84-f7c8-4751-8520-f4153d94ad0b
root@hyperspace:/mnt/client# stat /mnt/sda7/export3/.glusterfs/e8/64/
  File: `/mnt/sda7/export3/.glusterfs/e8/64/'
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 807h/2055d	Inode: 3204225     Links: 2
Access: (0700/drwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-06-04 15:36:23.301187300 +0530
Modify: 2012-06-04 15:35:46.681187294 +0530
Change: 2012-06-04 15:35:46.681187294 +0530
root@hyperspace:/mnt/client# stat /mnt/sda7/export3/.glusterfs/fc/76/fc76b58c-ecd4-4d5a-aa1a-159e01bbd8cf 
  File: `/mnt/sda7/export3/.glusterfs/fc/76/fc76b58c-ecd4-4d5a-aa1a-159e01bbd8cf'
  Size: 0         	Blocks: 0          IO Block: 4096   regular empty file
Device: 807h/2055d	Inode: 2883655     Links: 2
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-06-04 15:35:48.000000000 +0530
Modify: 2012-06-04 15:35:48.000000000 +0530
Change: 2012-06-04 15:35:48.141187294 +0530
root@hyperspace:/mnt/client# 
root@hyperspace:/mnt/client# ls
a  b
root@hyperspace:/mnt/client# mv b a
root@hyperspace:/mnt/client# ls
a
root@hyperspace:/mnt/client# getfattr -d -m . -e hex /mnt/sda7/export3/a
getfattr: Removing leading '/' from absolute path names
# file: mnt/sda7/export3/a
trusted.gfid=0xfc76b58cecd44d5aaa1a159e01bbd8cf
trusted.glusterfs.3382aaa7-37d0-4fab-bd3c-dc9a7a350acf.xtime=0x4fcc88b700007a9b

root@hyperspace:/mnt/client# stat /mnt/sda7/export3/.glusterfs/e8/64/
  File: `/mnt/sda7/export3/.glusterfs/e8/64/'
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 807h/2055d	Inode: 3204225     Links: 2
Access: (0700/drwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-06-04 15:36:23.301187300 +0530
Modify: 2012-06-04 15:36:47.021187302 +0530
Change: 2012-06-04 15:36:47.021187302 +0530
root@hyperspace:/mnt/client# ls /mnt/sda7/export3/.glusterfs/e8/64/
root@hyperspace:/mnt/client#

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