login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
5
Re: [PATCH] update sb->s_frozen when freezing read-only mounted device, too
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Akinobu Mita <akinobu.mita@...>
To: Christoph Hellwig <hch@...>
Cc: <linux-kernel@...>, <xfs@...>, Tim Shimmin <xfs-masters@...>, David Chinner <dgc@...>
Subject:
Re: [PATCH] update sb->s_frozen when freezing read-only mounted device, too
Date: Friday, October 5, 2007 - 9:20 am
2007/10/5, Christoph Hellwig <hch@lst.de>:
quoted text
> On Sat, Sep 29, 2007 at 07:09:12PM +0900, Akinobu Mita wrote: > > 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. > > I think this fix is valid, but it might be a tad cleaner to just > set s_frozen to SB_FREEZE_TRANS directly in a separate branch, ala:
It looks cleaner than mine. I'll resubmit it.
quoted text
> struct super_block *freeze_bdev(struct block_device *bdev) > { > struct super_block *sb; > > down(&bdev->bd_mount_sem); > sb = get_super(bdev); > if (!sb) > goto out; > > if (sb->s_flags & MS_RDONLY) { > sb->s_frozen = SB_FREEZE_TRANS; > smp_wmb(); > goto out; > } > > sb->s_frozen = SB_FREEZE_WRITE; > smp_wmb(); > > __fsync_super(sb); > > sb->s_frozen = SB_FREEZE_TRANS > smp_wmb(); > > sync_blockdev(sb->s_bdev); > > if (sb->s_op->write_super_lockfs) > sb->s_op->write_super_lockfs(sb); > > out: > sync_blockdev(bdev); > return sb; /* thaw_bdev releases s->s_umount and bd_mount_sem */ > } >
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] update sb->s_frozen when freezing read-only mount...
, Akinobu Mita
, (Sat Sep 29, 6:09 am)
Re: [PATCH] update sb->s_frozen when freezing read-only m...
, Christoph Hellwig
, (Thu Oct 4, 4:20 pm)
Re: [PATCH] update sb->s_frozen when freezing read-only m...
, Akinobu Mita
, (Fri Oct 5, 9:20 am)
Re: [PATCH] update sb->s_frozen when freezing read-only m...
, Akinobu Mita
, (Wed Oct 10, 11:20 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Amit K. Arora
[RFC] Heads up on sys_fallocate()
Chuck Ebbert
Why do so many machines need "noapic"?
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Natalie Protasevich
[BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
436 guests
online.
Syndicate