From: David van Moolenbroek Date: Sun, 24 Aug 2014 09:38:25 +0000 (+0000) Subject: libminixfs: do not make fs_sync upcalls X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/verify-sign/verify.pl?a=commitdiff_plain;h=c5beebb68d13f34b4dadc698253e56fa96f9c0af;p=minix.git libminixfs: do not make fs_sync upcalls The file system may not be expecting these upcalls at arbitrary moments, while they serve only as a performance optimization anyway. Change-Id: I0748fd1f6c2645ddbb64466093ee36025aac45e0 --- diff --git a/minix/include/minix/libminixfs.h b/minix/include/minix/libminixfs.h index 6ad6299d9..8293fa307 100644 --- a/minix/include/minix/libminixfs.h +++ b/minix/include/minix/libminixfs.h @@ -59,7 +59,6 @@ void lmfs_blockschange(dev_t dev, int delta); /* calls that libminixfs does into fs */ void fs_blockstats(u64_t *blocks, u64_t *free, u64_t *used); -int fs_sync(void); /* get_block arguments */ #define NORMAL 0 /* forces get_block to do disk read */ diff --git a/minix/lib/libminixfs/cache.c b/minix/lib/libminixfs/cache.c index 3f7a2c5da..787759fc1 100644 --- a/minix/lib/libminixfs/cache.c +++ b/minix/lib/libminixfs/cache.c @@ -854,7 +854,7 @@ void lmfs_buf_pool(int new_nr_bufs) if(nr_bufs > 0) { assert(buf); - (void) fs_sync(); + lmfs_flushall(); for (bp = &buf[0]; bp < &buf[nr_bufs]; bp++) { if(bp->data) { assert(bp->lmfs_bytes > 0); diff --git a/minix/tests/test72.c b/minix/tests/test72.c index c762238f9..9aa105dc2 100644 --- a/minix/tests/test72.c +++ b/minix/tests/test72.c @@ -90,12 +90,6 @@ void testend(void) /* Fake some libminixfs client functions */ -int -fs_sync(void) -{ - return 0; -} - void fs_blockstats(u64_t *total, u64_t *free, u64_t *used) {