Whamcloud - gitweb
Disable the code which sets the file size on the MDS:
authoradilger <adilger>
Tue, 29 Oct 2002 06:29:18 +0000 (06:29 +0000)
committeradilger <adilger>
Tue, 29 Oct 2002 06:29:18 +0000 (06:29 +0000)
1) we never (or should never) currently use the file size from the MDS
2) only the client which holds the size lock would need to update the MDS
3) that client already knows the correct file size locally, so no obd_getattr

Removing this hunk of code also has the benefit of removing an extraneous
obd_getattr() x stripe_count + mdc_setattr() per file, so it should improve
performance for tar/bonnie/etc noticably.

Passes multi-client runtests.

lustre/llite/file.c

index e60ce2b..0bd1198 100644 (file)
@@ -272,9 +272,13 @@ static int ll_file_release(struct inode *inode, struct file *file)
         if (rc)
                 GOTO(out_mdc, rc = -abs(rc));
 
+#if 0
+#error "This should only be done on the node that already has the EOF lock"
+#error "and only in the case where the file size actually changed.  For now"
+#error "we don't care about the size on the MDS, since we never use it (the"
+#error "OST always has the authoritative size and we don't even use the MDS."
         /* If this fails and we goto out_fd, the file size on the MDS is out of
          * date.  Is that a big deal? */
-#warning "FIXME: don't do this if the file is unlinked already"
         if (file->f_mode & FMODE_WRITE) {
                 struct lustre_handle *lockhs;
 
@@ -310,6 +314,7 @@ static int ll_file_release(struct inode *inode, struct file *file)
                                 rc = rc2;
                 }
         }
+#endif
 
 out_mdc:
         rc2 = mdc_close(&sbi->ll_mdc_conn, inode->i_ino,