[dm-devel] Re: [PATCH 2.6.19 5/5] fs: freeze_bdev with semaphore not mutex

David Chinner dgc at sgi.com
Wed Nov 8 03:33:50 UTC 2006


On Wed, Nov 08, 2006 at 01:00:17AM +0100, Rafael J. Wysocki wrote:
> 
> However, XFS_IOC_FREEZE happily returns 0 after calling freeze_bdev(),
> apparetnly assuming that it won't fail.

Because it _can't_ fail at this point. We've got an active superblock,
because we've had to open a fd on the filesystem to get to the point
where we can issue the ioctl.

Hence the get_super() call will always succeed and the freeze
will be executed if we are not read only. The superblock
state changes if the freeze goes ahead, and XFS uses this state
change to determine what to do when the thaw command is sent.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group




More information about the dm-devel mailing list