From 2ef1327e062c548f288537950f2ebc59b10a1eff Mon Sep 17 00:00:00 2001 From: braam Date: Fri, 19 Oct 2001 05:17:34 +0000 Subject: [PATCH] fix statfs bug and a truncation issue. --- lustre/obdfs/rw.c | 3 ++- lustre/obdfs/super.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/obdfs/rw.c b/lustre/obdfs/rw.c index 218e366..19f1032 100644 --- a/lustre/obdfs/rw.c +++ b/lustre/obdfs/rw.c @@ -384,7 +384,8 @@ int obdfs_commit_write(struct file *file, struct page *page, unsigned from, unsi int rc; struct inode *inode = page->mapping->host; loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; - rc = obdfs_writepage(page); + // XXX test with synchronous writes + rc = obdfs_do_writepage(page, 1); kunmap(page); if (pos > inode->i_size) { inode->i_size = pos; diff --git a/lustre/obdfs/super.c b/lustre/obdfs/super.c index 6332866..faf46bb 100644 --- a/lustre/obdfs/super.c +++ b/lustre/obdfs/super.c @@ -459,7 +459,6 @@ int obdfs_notify_change(struct dentry *de, struct iattr *attr) static int obdfs_statfs(struct super_block *sb, struct statfs *buf) { struct statfs tmp; - int bufsize = sizeof(*buf); int err; ENTRY; @@ -469,8 +468,8 @@ static int obdfs_statfs(struct super_block *sb, struct statfs *buf) printk(__FUNCTION__ ": obd_statfs fails (%d)\n", err); return err; } - copy_to_user(buf, &tmp, (bufsize