* [PATCH 5/10] gfs2: Fix error handling in write_super_lockfs/unlockfs
@ 2008-09-26 8:58 Takashi Sato
2008-09-26 9:37 ` steve
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Sato @ 2008-09-26 8:58 UTC (permalink / raw)
To: Andrew Morton, Christoph Hellwig, linux-fsdevel@vger.kernel.org,
dm-devel@redhat.com
Cc: linux-kernel@vger.kernel.org
Changed write_super_lockfs so that it returns an error in case of an failure.
unlockfs always returns 0.
Signed-off-by: Takashi Sato <t-sato@yk.jp.nec.com>
Signed-off-by: Masayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>
---
ops_super.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff -uprN -X linux-2.6.27-rc7-lockfs-reiserfs/Documentation/dontdiff linux-2.6.27-rc7-lockfs-reiserfs/fs/gfs2/ops_super
.c linux-2.6.27-rc7-lockfs-gfs2/fs/gfs2/ops_super.c
--- linux-2.6.27-rc7-lockfs-reiserfs/fs/gfs2/ops_super.c 2008-09-26 12:24:01.000000000 +0900
+++ linux-2.6.27-rc7-lockfs-gfs2/fs/gfs2/ops_super.c 2008-09-26 17:02:06.000000000 +0900
@@ -161,18 +161,18 @@ static int gfs2_sync_fs(struct super_blo
}
/**
- * gfs2_write_super_lockfs - prevent further writes to the filesystem
+ * gfs2_freeze - prevent further writes to the filesystem
* @sb: the VFS structure for the filesystem
*
*/
-static void gfs2_write_super_lockfs(struct super_block *sb)
+static int gfs2_freeze(struct super_block *sb)
{
struct gfs2_sbd *sdp = sb->s_fs_info;
int error;
if (test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
- return;
+ return -EINVAL;
for (;;) {
error = gfs2_freeze_fs(sdp);
@@ -192,17 +192,19 @@ static void gfs2_write_super_lockfs(stru
fs_err(sdp, "retrying...\n");
msleep(1000);
}
+ return 0;
}
/**
- * gfs2_unlockfs - reallow writes to the filesystem
+ * gfs2_unfreeze - reallow writes to the filesystem
* @sb: the VFS structure for the filesystem
*
*/
-static void gfs2_unlockfs(struct super_block *sb)
+static int gfs2_unfreeze(struct super_block *sb)
{
gfs2_unfreeze_fs(sb->s_fs_info);
+ return 0;
}
/**
@@ -505,8 +507,8 @@ const struct super_operations gfs2_super
.put_super = gfs2_put_super,
.write_super = gfs2_write_super,
.sync_fs = gfs2_sync_fs,
- .write_super_lockfs = gfs2_write_super_lockfs,
- .unlockfs = gfs2_unlockfs,
+ .freeze_fs = gfs2_freeze,
+ .unfreeze_fs = gfs2_unfreeze,
.statfs = gfs2_statfs,
.remount_fs = gfs2_remount_fs,
.clear_inode = gfs2_clear_inode,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 5/10] gfs2: Fix error handling in write_super_lockfs/unlockfs
2008-09-26 8:58 [PATCH 5/10] gfs2: Fix error handling in write_super_lockfs/unlockfs Takashi Sato
@ 2008-09-26 9:37 ` steve
0 siblings, 0 replies; 2+ messages in thread
From: steve @ 2008-09-26 9:37 UTC (permalink / raw)
To: Takashi Sato
Cc: Andrew Morton, Christoph Hellwig, linux-fsdevel@vger.kernel.org,
dm-devel@redhat.com, viro@ZenIV.linux.org.uk,
linux-ext4@vger.kernel.org, xfs@oss.sgi.com, axboe@kernel.dk,
mtk.manpages@googlemail.com, linux-kernel@vger.kernel.org
Hi,
On Fri, Sep 26, 2008 at 05:58:21PM +0900, Takashi Sato wrote:
> Changed write_super_lockfs so that it returns an error in case of an failure.
> unlockfs always returns 0.
Looks good now. Thanks,
Steve.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-26 9:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-26 8:58 [PATCH 5/10] gfs2: Fix error handling in write_super_lockfs/unlockfs Takashi Sato
2008-09-26 9:37 ` steve
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).