mbox series

[0/2,v2] bdev: Avoid discarding buffers under a filesystem

Message ID 20200904085852.5639-1-jack@suse.cz
Headers show
Series bdev: Avoid discarding buffers under a filesystem | expand

Message

Jan Kara Sept. 4, 2020, 8:58 a.m. UTC
Hello,

this patch set fixes problems when buffer heads are discarded under a
live filesystem (which can lead to all sorts of issues like crashes in case
of ext4). Patch 1 drops some stale buffer invalidation code, patch 2
temporarily gets exclusive access to the block device for the duration of
buffer cache handling to avoid interfering with other exclusive bdev user.
The patch fixes the problems for me and pass xfstests for ext4.

Changes since v1:
* Check for exclusive access to the bdev instead of for the presence of
  superblock

								Honza

Comments

Jan Kara Sept. 7, 2020, 10:35 a.m. UTC | #1
Hello!

On Fri 04-09-20 10:58:50, Jan Kara wrote:
> this patch set fixes problems when buffer heads are discarded under a
> live filesystem (which can lead to all sorts of issues like crashes in case
> of ext4). Patch 1 drops some stale buffer invalidation code, patch 2
> temporarily gets exclusive access to the block device for the duration of
> buffer cache handling to avoid interfering with other exclusive bdev user.
> The patch fixes the problems for me and pass xfstests for ext4.
> 
> Changes since v1:
> * Check for exclusive access to the bdev instead of for the presence of
>   superblock

Jens, now that Christoph has reviewed the patches (thanks Christoph!), can
you pick up the patches to your tree please? Thanks!

								Honza
Jens Axboe Sept. 7, 2020, 4:24 p.m. UTC | #2
On 9/7/20 4:35 AM, Jan Kara wrote:
> Hello!
> 
> On Fri 04-09-20 10:58:50, Jan Kara wrote:
>> this patch set fixes problems when buffer heads are discarded under a
>> live filesystem (which can lead to all sorts of issues like crashes in case
>> of ext4). Patch 1 drops some stale buffer invalidation code, patch 2
>> temporarily gets exclusive access to the block device for the duration of
>> buffer cache handling to avoid interfering with other exclusive bdev user.
>> The patch fixes the problems for me and pass xfstests for ext4.
>>
>> Changes since v1:
>> * Check for exclusive access to the bdev instead of for the presence of
>>   superblock
> 
> Jens, now that Christoph has reviewed the patches (thanks Christoph!), can
> you pick up the patches to your tree please? Thanks!

Yep, I applied them for 5.10. Thanks!