From: Alexandre Ratchov <alexandre.ratchov@bull.net>
To: linux-ext4@vger.kernel.org
Cc: Jean-Pierre Dion <jean-pierre.dion@bull.net>
Subject: [patch 03/12] rfc: 2fsprogs update
Date: Tue, 26 Sep 2006 16:46:33 +0200 [thread overview]
Message-ID: <20060926144633.GC25755@openx1.frec.bull.fr> (raw)
In-Reply-To: <20060926143343.GA20020@openx1.frec.bull.fr>
Allow regular files to be preallocated on-disk up to the next multiple
of the system PAGE_SIZE without complaining about extra blocks.
Index: e2fsprogs/e2fsck/pass1.c
===================================================================
--- e2fsprogs.orig/e2fsck/pass1.c 2006-07-05 12:11:09.000000000 -0600
+++ e2fsprogs/e2fsck/pass1.c 2006-07-05 14:23:49.000000000 -0600
@@ -1486,9 +1486,14 @@ static void check_blocks(e2fsck_t ctx, s
bad_size = 2;
}
} else {
+ e2_blkcnt_t blkpg = getpagesize() / fs->blocksize;
+
size = EXT2_I_SIZE(inode);
if ((pb.last_block >= 0) &&
- (size < (__u64) pb.last_block * fs->blocksize))
+ /* allow allocated blocks to end of PAGE_SIZE */
+ (size < (__u64)pb.last_block * fs->blocksize) &&
+ (pb.last_block / blkpg * blkpg != pb.last_block ||
+ size < (__u64)(pb.last_block & ~(blkpg-1)) *fs->blocksize))
bad_size = 3;
else if (size > ext2_max_sizes[fs->super->s_log_block_size])
bad_size = 4;
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
next prev parent reply other threads:[~2006-09-26 14:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-26 14:33 rfc: 2fsprogs update Alexandre Ratchov
2006-09-26 14:45 ` [patch 02/12] " Alexandre Ratchov
2006-09-26 14:46 ` Alexandre Ratchov [this message]
2006-09-26 14:47 ` [patch 04/12] " Alexandre Ratchov
2006-09-26 17:32 ` Theodore Tso
2006-09-26 19:54 ` Andreas Dilger
2006-09-26 21:16 ` Theodore Tso
2006-09-27 12:59 ` Alexandre Ratchov
2006-09-27 14:10 ` Theodore Tso
2006-09-26 14:47 ` [patch 05/12] " Alexandre Ratchov
2006-09-26 14:48 ` [patch 06/12] " Alexandre Ratchov
2006-09-26 14:48 ` [patch 07/12] " Alexandre Ratchov
2006-09-26 17:37 ` Theodore Tso
2006-09-27 13:36 ` Alexandre Ratchov
2006-09-27 14:38 ` Theodore Tso
2006-09-26 14:49 ` [patch 08/12] " Alexandre Ratchov
2006-09-26 14:50 ` [patch 10/12] " Alexandre Ratchov
2006-09-26 14:50 ` [patch 11/12] " Alexandre Ratchov
2006-09-26 14:50 ` [patch 12/12] " Alexandre Ratchov
2006-09-26 16:47 ` Alexandre Ratchov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060926144633.GC25755@openx1.frec.bull.fr \
--to=alexandre.ratchov@bull.net \
--cc=jean-pierre.dion@bull.net \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox