Bug 1468202 - inodelk in dht_migrate_file is ineffective for hardlink migration
inodelk in dht_migrate_file is ineffective for hardlink migration
Status: NEW
Product: GlusterFS
Classification: Community
Component: distribute (Show other bugs)
mainline
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: bugs@gluster.org
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-06 06:00 EDT by Susant Kumar Palai
Modified: 2018-01-08 10:35 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Susant Kumar Palai 2017-07-06 06:00:02 EDT
Description of problem:
dht_migrate_file takes inodelk before migrating a file to avoid clash with rename operation. But the lk_owner is not filled here(lk_owner is basically zero) making it ineffective for hardlink migration since hardlinks for a file need to be migrated synchronously.

This bug is created to track the fix for this.
Comment 1 Nithya Balachandran 2018-01-08 10:35:36 EST
The inodelk APIs get the lk_owner from the frame->root->lk_owner (not the flock->l_owner) which is set to the process pid if not explicitly set by the caller. dht_migrate_file uses syncop_inodelk which does not provide access to the frame, so the lk_owner is always 0xfdfffff (-3 which is GF_CLIENT_PID_DEFRAG). As the owner is the same, the inodelk is always granted for all hardlinks.

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