[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lustre-cvs
Subject:    [Lustre-cvs] CVS: obd/obdfs rw.c,1.52,1.53 super.c,1.47,1.48
From:       "Peter J. Braam" <braam () users ! sourceforge ! net>
Date:       2001-10-18 22:18:13
[Download RAW message or body]

Update of /cvsroot/lustre/obd/obdfs
In directory usw-pr-cvs1:/tmp/cvs-serv7267/obdfs

Modified Files:
	rw.c super.c 
Log Message:
fix statfs bug and a truncation issue. 


Index: rw.c
===================================================================
RCS file: /cvsroot/lustre/obd/obdfs/rw.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- rw.c	2001/10/19 04:13:53	1.52
+++ rw.c	2001/10/19 05:17:34	1.53
@@ -384,7 +384,8 @@
         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;

Index: super.c
===================================================================
RCS file: /cvsroot/lustre/obd/obdfs/super.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- super.c	2001/10/19 04:13:53	1.47
+++ super.c	2001/10/19 05:17:34	1.48
@@ -459,7 +459,6 @@
 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 @@
                 printk(__FUNCTION__ ": obd_statfs fails (%d)\n", err);
                 return err;
         }
-        copy_to_user(buf, &tmp, (bufsize<sizeof(tmp)) ? bufsize : sizeof(tmp));
-
+	memcpy(buf, &tmp, sizeof(*buf));
+	CDEBUG(D_SUPER, "statfs returns avail %ld\n", tmp.f_bavail);
         EXIT;
 
         return err; 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic