Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1155629pxk; Fri, 4 Sep 2020 01:59:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8FkA5+INBXcPRMKO5JLJQvgqPs/yW4yltAheUO99DABTHiTR1j3Hfsn1zE1SWg+v3vsoj X-Received: by 2002:a17:906:b47:: with SMTP id v7mr6093865ejg.310.1599209991566; Fri, 04 Sep 2020 01:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599209991; cv=none; d=google.com; s=arc-20160816; b=kR7grgDIA72yEkIZFdC7ZPTJ6e8m1CZ7RZt9bUfh+KnKf74fw4BqgZEKm8vHSfbge2 WIXV8X4a8yWc4rLgOR6XtPbY0OwuTFdpi/4uD2amqdAWPxY0xIZLZH+82avQ+ZpHFMQc aZ4Ozm3aFiQZrkvVsRI5mtApGWQ2OLg0kLMM6iZo4qFPwuZONYapoZ0ASoM7J7y6dudC dPlEvqfjkKaGJk/21vfzGcMRmvno3BeNMZ+IhC0eGe4BeXd3md+SnvG3GUYzl5bge/Rg KZbm1jUKvZhPcbFmbibmhPWrSH1h93nT4YYdWs5GXM+wa6FhkBH8we/hRU+j8e5KCvrQ mHRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=NyuyKQKK7sH0yYplKlDybJgmXr0m0Ju5eoqrFY73uEM=; b=dcoJNz9q2wWP0sVY9x2tqYxgwOt2xhoSTefzcJBN80dLcBCnxWmJmjyqE7F1jlex+U 7qexCrWADFApjSxRdQmesNC55x0y/+R1CHy6quuLpgpAJwUlmMSVPSiDLcQTFc/+Q2Rf bMviCcppoZOLcWIrJFZmPEysJ+zDyZGd7JBXo10ZUfJTcF0tfcCbeHQ/cseJbgpXIsn6 HBSc5VbS4KO8SdPc9MpPLXynljc2tvKuvyH8wMYlKilSwSQ5RqgvmSgz5WoocZD4SxLu tG7hMz8o9jOMQtVgl52AU5VkP16G6wZ0S1rOI3YcfXifGI1Yb9kvuqfpHMkM/gyNSBZk +AYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si4179208edi.15.2020.09.04.01.59.20; Fri, 04 Sep 2020 01:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729943AbgIDI7B (ORCPT + 99 others); Fri, 4 Sep 2020 04:59:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:37370 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729877AbgIDI67 (ORCPT ); Fri, 4 Sep 2020 04:58:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 71070ACB0; Fri, 4 Sep 2020 08:58:58 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id B83151E12D1; Fri, 4 Sep 2020 10:58:56 +0200 (CEST) From: Jan Kara To: Cc: , , Christoph Hellwig , yebin , Andreas Dilger , Jens Axboe , Jan Kara Subject: [PATCH 0/2 v2] bdev: Avoid discarding buffers under a filesystem Date: Fri, 4 Sep 2020 10:58:50 +0200 Message-Id: <20200904085852.5639-1-jack@suse.cz> X-Mailer: git-send-email 2.16.4 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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