From: Salah Triki <salah.triki@gmail.com>
To: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
luisbg@osg.samsung.com
Cc: linux-kernel@vger.kernel.org, salah.triki@gmail.com
Subject: [PATCH 1/3] fs: befs: load flags field from disk
Date: Tue, 9 Aug 2016 13:32:54 +0100 [thread overview]
Message-ID: <9f647c2c2067379143fe85dfcb94842dbed0a97e.1470745951.git.salah.triki@gmail.com> (raw)
flags field is usefull for validating the superblock state, so add this
field to befs_sb_info and read the state from the disk.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
fs/befs/befs.h | 3 +++
fs/befs/super.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/fs/befs/befs.h b/fs/befs/befs.h
index e0f59263a..511d16d 100644
--- a/fs/befs/befs.h
+++ b/fs/befs/befs.h
@@ -43,6 +43,9 @@ struct befs_sb_info {
u32 ag_shift;
u32 num_ags;
+ /* State of the superblock */
+ u32 flags;
+
/* jornal log entry */
befs_block_run log_blocks;
befs_off_t log_start;
diff --git a/fs/befs/super.c b/fs/befs/super.c
index aeafc4d..5ab75e8 100644
--- a/fs/befs/super.c
+++ b/fs/befs/super.c
@@ -45,6 +45,8 @@ befs_load_sb(struct super_block *sb, befs_super_block * disk_sb)
befs_sb->ag_shift = fs32_to_cpu(sb, disk_sb->ag_shift);
befs_sb->num_ags = fs32_to_cpu(sb, disk_sb->num_ags);
+ befs_sb->flags = fs32_to_cpu(sb, disk_sb->flags);
+
befs_sb->log_blocks = fsrun_to_cpu(sb, disk_sb->log_blocks);
befs_sb->log_start = fs64_to_cpu(sb, disk_sb->log_start);
befs_sb->log_end = fs64_to_cpu(sb, disk_sb->log_end);
--
1.9.1
next reply other threads:[~2016-08-09 12:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 12:32 Salah Triki [this message]
2016-08-09 12:32 ` [PATCH 2/3] fs: befs: check flags field to validate the superblock state Salah Triki
2016-08-09 12:40 ` Luis de Bethencourt
2016-08-09 12:59 ` Salah Triki
2016-08-09 13:50 ` Luis de Bethencourt
2016-08-09 12:32 ` [PATCH 3/3] fs: befs: fix typo in befs_sb_info Salah Triki
2016-08-09 12:46 ` Luis de Bethencourt
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=9f647c2c2067379143fe85dfcb94842dbed0a97e.1470745951.git.salah.triki@gmail.com \
--to=salah.triki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luisbg@osg.samsung.com \
--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
all inboxes | Powered by JetHome®