Re: [PATCH 04/45] fs: simplify freeze_bdev/thaw_bdev
From: Christoph Hellwig <hch@lst.de>
Date: 2020-11-25 16:22:57
Also in:
dm-devel, linux-bcache, linux-fsdevel, linux-mm
From: Christoph Hellwig <hch@lst.de>
Date: 2020-11-25 16:22:57
Also in:
dm-devel, linux-bcache, linux-fsdevel, linux-mm
On Wed, Nov 25, 2020 at 01:29:53PM +0100, Jan Kara wrote:
quoted
mutex_unlock(&bdev->bd_fsfreeze_mutex); - return sb; /* thaw_bdev releases s->s_umount */ + return error; /* thaw_bdev releases s->s_umount */The comment about thaw_bdev() seems to be stale? At least I don't see what it's speaking about...
Yes, this comment seems long stale. I think in the very early days we held s_umount on frozen file system, which caused all kinds of problems.
quoted
mutex_unlock(&bdev->bd_fsfreeze_mutex); - return error; + return 0;But we now won't return -EINVAL if this gets called e.g. with bd_fsfreeze_count == 0, right?
Yes. I had tried to drop the return value as all the freeze_bdev calls ignored it. But I had missed the unpaired emergency thaw and put it back and messed this up..