Bug 1286092 - Duplicate files seen on mount point while trying to create files which are greater than the brick size
Duplicate files seen on mount point while trying to create files which are gr...
Status: ON_QA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: distribute (Show other bugs)
Unspecified Unspecified
medium Severity urgent
: ---
: RHGS 3.4.0
Assigned To: Raghavendra G
Prasad Desala
dht-brick-full, dht-qe-3.2, dht-3.2.0...
: ZStream
Depends On: 1464350 990909 1471366
Blocks: 1286095 RHGS-3.4-GSS-proposed-tracker 1503134 1286134
  Show dependency treegraph
Reported: 2015-11-27 05:45 EST by Susant Kumar Palai
Modified: 2018-03-07 10:30 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 990909
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 2 Raghavendra G 2016-07-01 06:38:26 EDT

1. Posix_mknod succeeds even though linkto xattr is not set because of no space. However the dentry/file is created. Hence this is a file with only T bit set, but without any linkto xattr.
2. Since mknod succeeds, dht proceeds to create data file on a subvol with enough space (min-free disk scenario).
3. Now we've two files and both are data files (because of lack of linkto xattr on hashed-subvol).

Also, since the file on hashed-subvol has only T bit set, all calls to IS_DHT_MIGRATION_PHASE2 succeed. This results in fops like dht_writev_cbk, dht_stat_cbk etc (fops handling migration) to falsely assume that a migration is going on and invoke dht_migration_complete_check task, which fails because of lack of linkto xattr. This error is propagated back to application in these calls (write, stat etc).


Two possible fixes.
1. make posix_mknod atomic with respect to file creation and xattr setting. It should succeed only if both succeed. When xattr setting fails, it should cleanup the file.
2. dht_linkfile_create_cbk should double check whether the file created is indeed a linkto file (by asking for linkto xattr and iatt in cbk). If it finds that file created is not a linkto file, it'll cleanup the file and fails the create call with appropriate error (ENOSPC in this case).

Comment 4 Raghavendra G 2017-12-22 02:31:40 EST
With patch [1], this bug will go away. Note that [1] is already part of 3.4.0 branch


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