]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: remove O_LAZY 403/head
authorSage Weil <sage@inktank.com>
Mon, 8 Jul 2013 18:24:48 +0000 (11:24 -0700)
committerSage Weil <sage@inktank.com>
Mon, 8 Jul 2013 18:24:48 +0000 (11:24 -0700)
The once-upon-a-time unique O_LAZY value I chose forever ago is now
O_NOATIME, which means that some clients are choosing relaxed
consistency without meaning to.

It is highly unlikely that a real O_LAZY will ever exist, and we can
select it in the ceph case with the ioctl or libcephfs call, so drop
any support for doing this via open(2) flags.

Update doc/lazy_posix.txt file re: lazy io.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/client/Fh.h
src/doc/lazy_posix.txt
src/include/ceph_fs.cc
src/include/types.h

index 59f8f33d3627b4bde0553b8da36dfa55efa10f62..3c573c2c14e774d356984956c0fe6f9bf0471306 100644 (file)
@@ -14,8 +14,6 @@ struct Fh {
   int       mds;        // have to talk to mds we opened with (for now)
   int       mode;       // the mode i opened the file with
 
-  bool is_lazy() { return mode & O_LAZY; }
-
   int flags;
   bool pos_locked;           // pos is currently in use
   list<Cond*> pos_waiters;   // waiters for pos
index 1d226cd03d8e45f769b87bee77a29c46e556af22..a7bc34e30302abe1b2c0ffa550439be6841c9a9e 100644 (file)
@@ -25,7 +25,7 @@ http://www.usenix.org/events/fast05/wips/slides/welch.pdf
 
 -- lazy i/o integrity
 
-  O_LAZY to open(2)
+  FIXME: currently missing call to flag an Fd/file has lazy.  used to be O_LAZY on open, but no more.
 
   * relax data coherency
   * writes may not be visible until lazyio_propagate, fsync, close
@@ -50,4 +50,4 @@ int lockg(int fd, int cmd, lgid_t *lgid)
 
 int openg(char *path, int mode, fh_t *handle);
    portable file handle
-int sutoc(fh_t *fh);
\ No newline at end of file
+int sutoc(fh_t *fh);
index 24512bbc483dbff881a2f12a558c9a06a8ef2c16..6e3c143361e6c275c41134b9246390dc5d3e37be 100644 (file)
@@ -56,10 +56,6 @@ int ceph_flags_to_mode(int flags)
                mode = CEPH_FILE_MODE_RDWR;
                break;
        }
-#ifdef O_LAZY
-       if (flags & O_LAZY)
-               mode |= CEPH_FILE_MODE_LAZY;
-#endif
 
        return mode;
 }
index 55066c9785205a98c444897100d9cd29d0d30bf3..bed00175dd41b17cb2ebd11a2d9bc1fd030dbb73 100644 (file)
@@ -271,8 +271,6 @@ typedef uint64_t tid_t;         // transaction id
 typedef uint64_t version_t;
 typedef __u32 epoch_t;       // map epoch  (32bits -> 13 epochs/second for 10 years)
 
-#define O_LAZY 01000000
-
 // --------------------------------------
 // identify individual mount clients by 64bit value