From: Vyacheslav Dubeyko <slava@dubeyko.com>
To: Linux FS devel list <linux-fsdevel@vger.kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
ChristophHellwig <hch@infradead.org>,
Hin-Tak Leung <htl10@users.sourceforge.net>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 05/14] hfsplus: implement "norecovery" mount option support
Date: Thu, 26 Dec 2013 13:45:37 +0400 [thread overview]
Message-ID: <1388051137.4168.66.camel@slavad-ubuntu> (raw)
From: Vyacheslav Dubeyko <slava@dubeyko.com>
Subject: [PATCH 05/14] hfsplus: implement "norecovery" mount option support
The patch implements support of "norecovery" mount option.
Such option is usefull in the case of necessity to mount
a HFS+ journaled volume in READ-ONLY mode without journal
replay.
Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
CC: Christoph Hellwig <hch@infradead.org>
CC: Hin-Tak Leung <htl10@users.sourceforge.net>
---
Documentation/filesystems/hfsplus.txt | 4 ++++
fs/hfsplus/hfsplus_fs.h | 1 +
fs/hfsplus/options.c | 8 +++++++-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Documentation/filesystems/hfsplus.txt b/Documentation/filesystems/hfsplus.txt
index af1628a..c8a4b32 100644
--- a/Documentation/filesystems/hfsplus.txt
+++ b/Documentation/filesystems/hfsplus.txt
@@ -50,6 +50,10 @@ When mounting an HFSPlus filesystem, the following options are accepted:
nls=cccc
Encoding to use when presenting file names.
+ norecovery
+ Don't load the journal on mounting. Note that this forces
+ mount of inconsistent filesystem, which can lead to
+ various problems.
References
==========
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index 8a6003c..7d353eb 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -221,6 +221,7 @@ struct hfsplus_sb_info {
#define HFSPLUS_SB_HFSX 3
#define HFSPLUS_SB_CASEFOLD 4
#define HFSPLUS_SB_NOBARRIER 5
+#define HFSPLUS_SB_NORECOVERY 6
static inline struct hfsplus_sb_info *HFSPLUS_SB(struct super_block *sb)
{
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c
index 968eab5..71f4287 100644
--- a/fs/hfsplus/options.c
+++ b/fs/hfsplus/options.c
@@ -24,7 +24,7 @@ enum {
opt_part, opt_session, opt_nls,
opt_nodecompose, opt_decompose,
opt_barrier, opt_nobarrier,
- opt_force, opt_err
+ opt_force, opt_norecovery, opt_err
};
static const match_table_t tokens = {
@@ -41,6 +41,7 @@ static const match_table_t tokens = {
{ opt_barrier, "barrier" },
{ opt_nobarrier, "nobarrier" },
{ opt_force, "force" },
+ { opt_norecovery, "norecovery" },
{ opt_err, NULL }
};
@@ -196,6 +197,9 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi)
case opt_force:
set_bit(HFSPLUS_SB_FORCE, &sbi->flags);
break;
+ case opt_norecovery:
+ set_bit(HFSPLUS_SB_NORECOVERY, &sbi->flags);
+ break;
default:
return 0;
}
@@ -235,5 +239,7 @@ int hfsplus_show_options(struct seq_file *seq, struct dentry *root)
seq_printf(seq, ",nodecompose");
if (test_bit(HFSPLUS_SB_NOBARRIER, &sbi->flags))
seq_printf(seq, ",nobarrier");
+ if (test_bit(HFSPLUS_SB_NORECOVERY, &sbi->flags))
+ seq_printf(seq, ",norecovery");
return 0;
}
--
1.7.9.5
reply other threads:[~2013-12-26 9:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1388051137.4168.66.camel@slavad-ubuntu \
--to=slava@dubeyko.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=htl10@users.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).