public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Corrupt counter improvement
@ 2020-07-02 12:23 Nikolay Borisov
  2020-07-02 12:23 ` [PATCH 1/8] btrfs: Make get_state_failrec return failrec directly Nikolay Borisov
                   ` (8 more replies)
  0 siblings, 9 replies; 30+ messages in thread
From: Nikolay Borisov @ 2020-07-02 12:23 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

This series aims to make the device corrupt counter be incremented when we
encounter checksum error. This stems from an upstream report at [0] that btrfs
doesn't actually increment the corruption device stats counter. There's no good
reason why this should be the case so here's a patchset rectifying this.

While looking around the code I thought the signature of the functions related
to creating the failrec are somewhat quirky so the first 2 patches fix this.

Patch 3 introduces btrfs_device into btrfs_io_bio so that functions in the
bio completion stack can use it.

Patch 4 removes a redundant check

Next 3 patches wire in increment of the CORRUPT counter in the respective
read end io routines, namely compressed and ordinary reads.

Last patch creates a symlink of the private bdi that btrfs creates on mount
which is used in an xfstest for this series.

[0] https://lore.kernel.org/linux-btrfs/4857863.FCrPRfMyHP@liv/

Nikolay Borisov (8):
  btrfs: Make get_state_failrec return failrec directly
  btrfs: Streamline btrfs_get_io_failure_record logic
  btrfs: Record btrfs_device directly btrfs_io_bio
  btrfs: Don't check for btrfs_device::bdev in btrfs_end_bio
  btrfs: Increment device corruption error in case of checksum error
  btrfs: Remove needless ASSERT
  btrfs: Increment corrupt device counter during compressed read
  btrfs: sysfs: Add bdi link to the fsid dir

 fs/btrfs/compression.c    |  10 ++-
 fs/btrfs/ctree.h          |   2 +
 fs/btrfs/extent-io-tree.h |   6 +-
 fs/btrfs/extent_io.c      | 152 +++++++++++++++++++-------------------
 fs/btrfs/inode.c          |   3 +
 fs/btrfs/raid56.c         |   1 +
 fs/btrfs/sysfs.c          |  16 +++-
 fs/btrfs/volumes.c        |  24 +++---
 fs/btrfs/volumes.h        |   2 +-
 9 files changed, 114 insertions(+), 102 deletions(-)

--
2.17.1


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2020-07-05 11:39 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-02 12:23 [PATCH 0/7] Corrupt counter improvement Nikolay Borisov
2020-07-02 12:23 ` [PATCH 1/8] btrfs: Make get_state_failrec return failrec directly Nikolay Borisov
2020-07-02 13:07   ` Josef Bacik
2020-07-02 13:25     ` David Sterba
2020-07-02 12:23 ` [PATCH 2/8] btrfs: Streamline btrfs_get_io_failure_record logic Nikolay Borisov
2020-07-02 13:13   ` Josef Bacik
2020-07-02 12:23 ` [PATCH 3/8] btrfs: Record btrfs_device directly btrfs_io_bio Nikolay Borisov
2020-07-02 13:14   ` Josef Bacik
2020-07-02 13:16   ` Johannes Thumshirn
2020-07-03  8:14   ` [PATCH v2] " Nikolay Borisov
2020-07-03 13:06     ` Johannes Thumshirn
2020-07-02 12:23 ` [PATCH 4/8] btrfs: Don't check for btrfs_device::bdev in btrfs_end_bio Nikolay Borisov
2020-07-02 13:15   ` Josef Bacik
2020-07-02 12:23 ` [PATCH 5/8] btrfs: Increment device corruption error in case of checksum error Nikolay Borisov
2020-07-02 13:18   ` Josef Bacik
2020-07-02 13:21   ` Johannes Thumshirn
2020-07-02 14:44     ` Nikolay Borisov
2020-07-02 12:23 ` [PATCH 6/8] btrfs: Remove needless ASSERT Nikolay Borisov
2020-07-02 13:19   ` Josef Bacik
2020-07-02 13:26   ` Johannes Thumshirn
2020-07-02 12:23 ` [PATCH 7/8] btrfs: Increment corrupt device counter during compressed read Nikolay Borisov
2020-07-02 13:21   ` Josef Bacik
2020-07-02 13:28   ` Johannes Thumshirn
2020-07-02 12:23 ` [PATCH 8/8] btrfs: sysfs: Add bdi link to the fsid dir Nikolay Borisov
2020-07-02 13:25   ` Josef Bacik
2020-07-02 13:36     ` David Sterba
2020-07-02 14:41       ` Nikolay Borisov
2020-07-03  8:13   ` [PATCH v2] " Nikolay Borisov
2020-07-05 11:39     ` Anand Jain
2020-07-03 15:32 ` [PATCH 0/7] Corrupt counter improvement David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox