Whamcloud - gitweb
revert attachment 24367 due compilation problems.
authorshadow <shadow>
Thu, 16 Jul 2009 04:46:01 +0000 (04:46 +0000)
committershadow <shadow>
Thu, 16 Jul 2009 04:46:01 +0000 (04:46 +0000)
Branch b1_8

b=18801

lustre/llite/file.c
lustre/tests/sanityN.sh

index 7d9cb0b..dfdd142 100644 (file)
@@ -1649,10 +1649,9 @@ repeat:
         } else {
                 retval = ll_direct_IO(READ, file, iov_copy, *ppos, nr_segs, 0);
                 if (retval > 0) {
-                        file_accessed(file);
-                        lprocfs_counter_add(sbi->ll_stats,
-                                            LPROC_LL_LOCKLESS_READ,
-                                            (long)retval);
+                       lprocfs_counter_add(sbi->ll_stats,
+                                           LPROC_LL_LOCKLESS_READ,
+                                           (long)retval);
                         *ppos += retval;
                 }
         }
@@ -1697,26 +1696,6 @@ static ssize_t ll_file_read(struct file *file, char *buf, size_t count,
 #endif
 }
 
-/* iov_shorten from linux kernel */
-static unsigned long ll_iov_shorten(struct iovec *iov,
-                                    unsigned long nr_segs,
-                                    size_t to)
-{
-        unsigned long seg = 0;
-        size_t len = 0;
-
-        while (seg < nr_segs) {
-                seg++;
-                if (len + iov->iov_len >= to) {
-                        iov->iov_len = to - len;
-                        break;
-                }
-                len += iov->iov_len;
-                iov++;
-        }
-        return seg;
-}
-
 /*
  * Write to a file (through the page cache).
  */
@@ -1881,34 +1860,11 @@ repeat:
                                                 *ppos);
 #endif
         } else {
-                size_t ocount, ncount;
-
-                retval = generic_segment_checks(iov_copy, &nrsegs_copy,
-                                                &ocount, VERIFY_READ);
-                if (retval)
-                        GOTO(out, retval);
-
-                retval = generic_write_checks(file, ppos, &ncount, 0);
-                if (retval)
-                        GOTO(out, retval);
-
-                if (unlikely(ocount != ncount)) {
-                        /* we are allowed to modify the original iov too */
-                        nrsegs_copy = ll_iov_shorten(iov_copy, nrsegs_copy,
-                                                     ncount);
-                        chunk = 0; /* no repetition after the short write */
-                }
-
-                retval = ll_remove_suid(file, file->f_vfsmnt);
-                if (retval)
-                        GOTO(out, retval);
-
-                file_update_time(file);
                 retval = ll_direct_IO(WRITE, file, iov_copy, *ppos, nr_segs, 0);
                 if (retval > 0) {
-                        lprocfs_counter_add(sbi->ll_stats,
-                                            LPROC_LL_LOCKLESS_WRITE,
-                                            (long)retval);
+                       lprocfs_counter_add(sbi->ll_stats,
+                                           LPROC_LL_LOCKLESS_WRITE,
+                                           (long)retval);
                         *ppos += retval;
                 }
         }
index 7d42930..e3fb5d6 100644 (file)
@@ -880,23 +880,6 @@ test_38() { # bug 18801, based on the code of test_32b
 }
 run_test 38 "lockless i/o with O_DIRECT and unaligned writes"
 
-test_39() {
-        local originaltime
-        local updatedtime
-        local delay=3
-
-        touch $DIR1/$tfile
-        originaltime=$(stat -c %Y $DIR1/$tfile)
-        log "original modification time is $originaltime"
-        sleep $delay
-        multiop $DIR1/$tfile oO_DIRECT:O_WRONLY:w$((10*1048576))c || error "multiop has failed"
-        updatedtime=$(stat -c %Y $DIR2/$tfile)
-        log "updated modification time is $updatedtime"
-        [ $((updatedtime - originaltime)) -ge $delay ] || error "invalid modification time"
-        rm -rf $DIR/$tfile
-}
-run_test 39 "direct I/O writes should update mtime ========="
-
 log "cleanup: ======================================================"
 
 check_and_cleanup_lustre