xfs-masters
[Top] [All Lists]

[xfs-masters] - update-sb-s_frozen-when-freezing-read-only-mounted-devic

To: akinobu.mita@xxxxxxxxx, dgc@xxxxxxx, hch@xxxxxx, xfs-masters@xxxxxxxxxxx, mm-commits@xxxxxxxxxxxxxxx
Subject: [xfs-masters] - update-sb-s_frozen-when-freezing-read-only-mounted-device-too.patch removed from -mm tree
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Fri, 05 Oct 2007 21:32:57 -0700
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
The patch titled
     update sb->s_frozen when freezing read-only mounted device, too
has been removed from the -mm tree.  Its filename was
     update-sb-s_frozen-when-freezing-read-only-mounted-device-too.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: update sb->s_frozen when freezing read-only mounted device, too
From: Akinobu Mita <akinobu.mita@xxxxxxxxx>

freeze_bdev() with the device which is mounted as read only does not change
sb->s_frozen from SB_UNFROZEN to SB_FREEZE_TRANS.

Because of this behavior, xfs_freeze can break read-only XFS filesystem.

Because xfs_thaw does nothing for the filesystem whose sb->s_frozen is
SB_UNFROZEN.  So freezed readonly XFS filesystem will never be unfreezed. 
Then we cannot do any unmount/remount operations for that filesystem.

This patch updates sb->s_frozen when freeze_bdev() is called for read-only
mounted device, too.

Cc: Tim Shimmin <xfs-masters@xxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: David Chinner <dgc@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN 
fs/buffer.c~update-sb-s_frozen-when-freezing-read-only-mounted-device-too 
fs/buffer.c
--- a/fs/buffer.c~update-sb-s_frozen-when-freezing-read-only-mounted-device-too
+++ a/fs/buffer.c
@@ -190,19 +190,22 @@ struct super_block *freeze_bdev(struct b
 
        down(&bdev->bd_mount_sem);
        sb = get_super(bdev);
-       if (sb && !(sb->s_flags & MS_RDONLY)) {
+       if (sb) {
                sb->s_frozen = SB_FREEZE_WRITE;
                smp_wmb();
 
-               __fsync_super(sb);
+               if (!(sb->s_flags & MS_RDONLY))
+                       __fsync_super(sb);
 
                sb->s_frozen = SB_FREEZE_TRANS;
                smp_wmb();
 
-               sync_blockdev(sb->s_bdev);
+               if (!(sb->s_flags & MS_RDONLY)) {
+                       sync_blockdev(sb->s_bdev);
 
-               if (sb->s_op->write_super_lockfs)
-                       sb->s_op->write_super_lockfs(sb);
+                       if (sb->s_op->write_super_lockfs)
+                               sb->s_op->write_super_lockfs(sb);
+               }
        }
 
        sync_blockdev(bdev);
_

Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are

origin.patch
module-return-error-when-mod_sysfs_init-failed.patch
update-sb-s_frozen-when-freezing-read-only-mounted-device-too.patch
cpu-hotplug-slab-cleanup-cpuup_callback.patch
cpu-hotplug-slab-fix-memory-leak-in-cpu-hotplug-error-path.patch
cpu-hotplug-cpu-deliver-cpu_up_canceled-only-to-notify_oked-callbacks-with-cpu_up_prepare.patch
cpu-hotplug-topology-remove-topology_dev_map.patch
cpu-hotplug-thermal_throttle-fix-cpu-hotplug-error-handling.patch
cpu-hotplug-msr-fix-cpu-hotplug-error-handling.patch
cpu-hotplug-mce-fix-cpu-hotplug-error-handling.patch
cpu-hotplug-intel_cacheinfo-fix-cpu-hotplug-error-handling.patch
cpu-hotplug-intel_cacheinfo-fix-cpu-hotplug-error-handling-fix-a-section-mismatch-warning.patch
do-cpu_dead-migrating-under-read_locktasklist-instead-of-write_lock_irqtasklist.patch
migration_callcpu_dead-use-spin_lock_irq-instead-of-task_rq_lock.patch


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] - update-sb-s_frozen-when-freezing-read-only-mounted-device-too.patch removed from -mm tree, akpm <=