From: adilger Date: Tue, 29 Oct 2002 06:29:18 +0000 (+0000) Subject: Disable the code which sets the file size on the MDS: X-Git-Tag: 0.5.16~98 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=74b44a65de0674e254cd0ee755a7ccd59076588a;p=fs%2Flustre-release.git Disable the code which sets the file size on the MDS: 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. --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index e60ce2b..0bd1198 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -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,