From: jeffm@suse.com
To: ReiserFS Development List <reiserfs-devel@vger.kernel.org>
Cc: Edward Shishkin <edward.shishkin@gmail.com>
Subject: [patch 2/9] [PATCH] reiserfsprogs: Warn on block sizes > 4k
Date: Thu, 24 Jan 2008 15:02:28 -0500 [thread overview]
Message-ID: <20080124200337.229383000@suse.com> (raw)
In-Reply-To: 20080124200226.606635000@suse.com
[-- Attachment #1: reiserfs-large-block-warning.diff --]
[-- Type: text/plain, Size: 2087 bytes --]
Filesystems created with block size > page size will not work until that
support is added to the kernel. Filesystems with block size > 4k (lowest
page size supported in Linux) will not work on all systems. This patch
adds a check and a warning in those conditions, informing the user of the
caveats of using a larger block size. It can be overridden with -f.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
mkreiserfs/mkreiserfs.c | 3 +++
reiserfscore/reiserfslib.c | 18 ++++++++++++++++++
2 files changed, 21 insertions(+)
--- a/mkreiserfs/mkreiserfs.c 2008-01-24 13:38:26.000000000 -0500
+++ b/mkreiserfs/mkreiserfs.c 2008-01-24 13:39:03.000000000 -0500
@@ -686,6 +686,9 @@ int main (int argc, char **argv)
if (!(mode & QUIET_MODE) && !can_we_format_it (device_name, force))
return 1;
+
+ if (!(mode & QUIET_MODE) && !block_size_ok (Block_size, force))
+ return 1;
if (jdevice_name)
if (!(mode & QUIET_MODE) && !can_we_format_it (jdevice_name, force))
--- a/reiserfscore/reiserfslib.c 2004-10-04 16:39:35.000000000 -0400
+++ b/reiserfscore/reiserfslib.c 2008-01-24 13:39:03.000000000 -0500
@@ -1175,6 +1175,24 @@ void make_sure_root_dir_exists (reiserfs
&parent_root_dir_key, ih_flags);
}
+int block_size_ok (int blocksize, int force)
+{
+ int pagesize = getpagesize();
+ if (blocksize > 4096) {
+ reiserfs_warning (stderr, "Block sizes larger than 4k are not "
+ "supported on all architectures.\n");
+ if (blocksize > pagesize)
+ reiserfs_warning (stderr, "The newly created filesystem will not "
+ "be mountable on this system.\n");
+ else
+ reiserfs_warning (stderr, "The newly created filesystem may not "
+ "be mountable on other systems.\n");
+ check_forcing_ask_confirmation (force);
+ }
+
+ return 1;
+}
+
/* we only can use a file for filesystem or journal if it is either not
mounted block device or regular file and we are forced to use it */
next prev parent reply other threads:[~2008-01-24 20:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 20:02 [patch 0/9] reiserfsprogs patch queue jeffm
2008-01-24 20:02 ` [patch 1/9] [PATCH] reiserfsprogs: QUIET_MODE should silence credits too jeffm
2008-01-24 20:02 ` jeffm [this message]
2008-01-24 20:02 ` [patch 3/9] [PATCH] reiserfsprogs: id_map_init off-by-one jeffm
2008-01-24 20:02 ` [patch 4/9] [PATCH] reiserfsprogs: changes for better external journal defaults jeffm
2008-01-24 20:02 ` [patch 5/9] reiserfsprogs: remove fsck_sleep jeffm
2008-01-24 20:02 ` [patch 6/9] reiserfsprogs: mkfs should use O_EXCL jeffm
2008-01-24 20:02 ` [patch 7/9] [PATCH] reiserfsprogs: enforce 2^32-1 block limit jeffm
2008-01-24 20:02 ` [patch 8/9] [PATCH] reiserfsprogs: Support for file systems > 8 TB jeffm
2008-01-24 20:02 ` [patch 9/9] [PATCH 1/2] reiserfsprogs: add ext3-style mount count and last check expiry for better fsck -a behavior jeffm
2008-01-25 11:01 ` [patch 0/9] reiserfsprogs patch queue Edward Shishkin
2008-01-25 15:45 ` Jeff Mahoney
2008-01-25 15:50 ` Jeff Mahoney
2008-03-24 0:28 ` Edward Shishkin
2008-03-24 2:25 ` Jeff Mahoney
2009-01-09 22:15 ` Edward Shishkin
2009-01-09 23:26 ` Jeff Mahoney
2008-01-25 16:00 ` [PATCH] reiserfsprogs: remove dependency on asm/unaligned.h Jeff Mahoney
2008-02-25 0:58 ` [patch 0/9] reiserfsprogs patch queue Domenico Andreoli
2008-02-25 13:17 ` Edward Shishkin
2008-02-25 16:58 ` Jeff Mahoney
2008-02-25 18:51 ` Edward Shishkin
2008-03-24 0:19 ` Edward Shishkin
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=20080124200337.229383000@suse.com \
--to=jeffm@suse.com \
--cc=edward.shishkin@gmail.com \
--cc=reiserfs-devel@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;
as well as URLs for NNTP newsgroup(s).