From: LiQiong Lee Date: Wed, 7 Aug 2013 10:09:41 +0000 (+0800) Subject: libminixfs: allow non-page-multiple blocksizes X-Git-Tag: v3.3.0~835 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F743%2F3;p=minix.git libminixfs: allow non-page-multiple blocksizes . this is OK (although it wastes some memory) as long as the VM interface isn't used, which has its own checks in libsys Change-Id: I28decd367b2cd5c01482bdc71615c65ab61c9a71 --- diff --git a/lib/libminixfs/cache.c b/lib/libminixfs/cache.c index adb482d99..2ff548faa 100644 --- a/lib/libminixfs/cache.c +++ b/lib/libminixfs/cache.c @@ -163,7 +163,6 @@ lmfs_alloc_block(struct buf *bp) { ASSERT(!bp->data); ASSERT(bp->lmfs_bytes == 0); - ASSERT(!(fs_block_size % PAGE_SIZE)); if((bp->data = minix_mmap(0, fs_block_size, PROT_READ|PROT_WRITE, MAP_PREALLOC|MAP_ANON, -1, 0)) == MAP_FAILED) { free_unused_blocks(); @@ -510,7 +509,6 @@ register struct buf *bp; /* buffer pointer */ ASSERT(bp->lmfs_bytes == fs_block_size); ASSERT(fs_block_size > 0); - ASSERT(!(fs_block_size % PAGE_SIZE)); pos = mul64u(bp->lmfs_blocknr, fs_block_size); if(fs_block_size > PAGE_SIZE) {