public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] [ubifs] add update vfs super block infomation when remount to ro mode.
@ 2010-04-08  7:00 ZhangJieJing
  2010-04-08  7:13 ` Artem Bityutskiy
  0 siblings, 1 reply; 10+ messages in thread
From: ZhangJieJing @ 2010-04-08  7:00 UTC (permalink / raw)
  To: linux-mtd

If some read/write error happens(eg.CRC error), ubifs make self a read
only mode,
but the vfs infomation still not update.
This patch add this also make /proc/mounts update.

Signed-off-by: zhangjiejing <kzjeef@gmail.com>

Change-Id: I709ada21d1f6168d2e785eac389510e2b5edb2a4
---
 fs/ubifs/io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 0168271..d33c233 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -63,6 +63,7 @@ void ubifs_ro_mode(struct ubifs_info *c, int err)
        if (!c->ro_media) {
                c->ro_media = 1;
                c->no_chk_data_crc = 0;
+                c->vfs_sb->s_flags |= MS_RDONLY;
                ubifs_warn("switched to read-only mode, error %d", err);
                dbg_dump_stack();
        }
--
1.6.3.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] ubifs: add update vfs super block infomation when remount to ro mode
@ 2010-04-16  3:36 ZhangJieJing
  2010-04-16 19:10 ` Artem Bityutskiy
  2010-04-28  7:24 ` Artem Bityutskiy
  0 siblings, 2 replies; 10+ messages in thread
From: ZhangJieJing @ 2010-04-16  3:36 UTC (permalink / raw)
  To: linux-mtd; +Cc: linux-fsdevel, Artem Bityutskiy

If some read/write error happens(eg.CRC error), ubifs make self a read
only mode,
but the vfs infomation still not update.
This patch add this also make /proc/mounts update.

Signed-off-by: Zhang Jiejing <kzjeef@gmail.com>
---
 fs/ubifs/io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 0168271..d33c233 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -63,6 +63,7 @@ void ubifs_ro_mode(struct ubifs_info *c, int err)
       if (!c->ro_media) {
               c->ro_media = 1;
               c->no_chk_data_crc = 0;
+              c->vfs_sb->s_flags |= MS_RDONLY;
               ubifs_warn("switched to read-only mode, error %d", err);
               dbg_dump_stack();
       }
--
1.6.3.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-04-29  6:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08  7:00 [PATCH] [ubifs] add update vfs super block infomation when remount to ro mode ZhangJieJing
2010-04-08  7:13 ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2010-04-16  3:36 [PATCH] ubifs: " ZhangJieJing
2010-04-16 19:10 ` Artem Bityutskiy
2010-04-28  7:24 ` Artem Bityutskiy
2010-04-29  2:14   ` Zhang JieJing
2010-04-29  3:46     ` Artem Bityutskiy
2010-04-29  6:36       ` Zhang JieJing
2010-04-29  6:44         ` Artem Bityutskiy
2010-04-29  6:38       ` Zhang JieJing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox