Whamcloud - gitweb
Branch b1_6
authorjohann <johann>
Tue, 5 May 2009 19:52:44 +0000 (19:52 +0000)
committerjohann <johann>
Tue, 5 May 2009 19:52:44 +0000 (19:52 +0000)
b=18206
i=green
i=bzzz

Disable per-stripe locking for O_DIRECT.

lustre/llite/file.c

index 07d7814..b9f1417 100644 (file)
@@ -1455,7 +1455,7 @@ static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
         }
 
 repeat:
-        if (sbi->ll_max_rw_chunk != 0) {
+        if (sbi->ll_max_rw_chunk != 0 && !(file->f_flags & O_DIRECT)) {
                 /* first, let's know the end of the current stripe */
                 end = *ppos;
                 obd_extent_calc(sbi->ll_osc_exp, lsm, OBD_CALC_STRIPE_END,
@@ -1696,7 +1696,7 @@ repeat:
                 lock_end = OBD_OBJECT_EOF;
                 iov_copy = (struct iovec *)iov;
                 nrsegs_copy = nr_segs;
-        } else if (sbi->ll_max_rw_chunk != 0) {
+        } else if (sbi->ll_max_rw_chunk != 0 && !(file->f_flags & O_DIRECT)) {
                 /* first, let's know the end of the current stripe */
                 end = *ppos;
                 obd_extent_calc(sbi->ll_osc_exp, lsm, OBD_CALC_STRIPE_END,