Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
9223372036854775807
Description
Since Lustre 2.8 (patch https://review.whamcloud.com/16238 "LU-6785 utils: compatibility fix for lfs migrate") "lfs migrate" has used "--block" as the default (i.e. block writes to a file during migration) for compatibility with pre-2.8.0 servers (or earlier for EE releases).
Since very few servers are this old, it would be better to change the default to try and get the file lease first unless a new migration_flags = MIGRATION_BLOCK flag is set, and only try the grouplock if the lease fails and migration_flags = MIGRATION_NONBLOCK is not set.
This will also solve the problem that "lfs migrate" without the "--non-block" option fails for DoM files until patch https://review.whamcloud.com/39406 "LU-13645 ldlm: group locks for DOM IBIT lock" is landed (which is having some headwind itself):
lfs migrate: cannot get group lock: Invalid argument
This would also be less complex/risky to backport to 2.12.
It would also be useful to consolidate the migrate_block() and migrate_nonblock() code if possible, instead of having two nearly-identical functions.