Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-12348

"flock" mount option should be enable by default

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      By default, flock()/lockf()/fcntl() functions that try to lock files would return failure because "-o flock" option is not enabled by default. This would cause failure to applications which are being migrated from local file systems (or other network file systems) to Lustre. And it makes sense to enable it by default because: 1) If nobody is going to use flock/lockf, as assumed by the default option, no overhead will be introduced by enabling it 2) flock()/lockf() only needs a single LDLM so not so expensive at all. 3) For users that abuse flock/lockf, they have the motivation to discover the option "localflock". 4) For users that don't use flock/lockf a lot, they don't even need to know their applications use flock/lockf or not.

      Other improvement that can be done:

      1) Console message like "flock disabled, mount with '-o flock' to enable" instead of just returning -EOPNOTSUPP.

      2) Console message like "Lustre doesn't support mandatory POSIX file lock" when an application tries to lock file with S_ISGID and without S_IXGRP too.

      Attachments

        Issue Links

          Activity

            People

              lixi_wc Li Xi
              lixi_wc Li Xi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: