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.
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.
Status?
(In reply to Yaniv Kaul from comment #2) > Status? This is more of an optimization. We have synclock in place for now to handle hardlink migration. Will take this up in future.
Closing this bug as there is no functionality impact. Deferring to future release.