All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs-progs: Detect compressed extent without csum
@ 2018-05-14  7:03 Qu Wenruo
  2018-05-14  7:03 ` [PATCH 1/3] btrfs-progs: check/lowmem: Add checks for " Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Qu Wenruo @ 2018-05-14  7:03 UTC (permalink / raw)
  To: linux-btrfs

Patches can be fetch from github:
https://github.com/adam900710/btrfs-progs/tree/compress_nodatasum

It's based on v4.16 stable branch.

James Harvey from mail list reports a strange kernel panic, whichs show
obviously kernel memory corruption, while after btrfs decompression
failure.

It turns out that, some compressed extent get corrupted on-disk, while
the inode has NODATASUM set, there is no csum to prevent corrupted
mirror being used.

Although the root cause should be buggy lzo implementation, it still
shows that btrfs is not following the behavior defined in btrfs(5):

     Note
     If nodatacow or nodatasum are enabled, compression is disabled.

So at least make btrfs check to detect such problem.

Qu Wenruo (3):
  btrfs-progs: check/lowmem: Add checks for compressed extent without
    csum
  btrfs-progs: check/original: Add checks for compressed extent without
    csum
  btrfs-progs: fsck-tests: Add test case for detecting compressed extent
    without csum

 check/main.c                                  |  10 ++++++--
 check/mode-lowmem.c                           |  18 +++++++++++++
 .../compressed_extent_without_csum.raw.xz     | Bin 0 -> 21996 bytes
 .../032-compressed-nodatasum/test.sh          |  24 ++++++++++++++++++
 4 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 tests/fsck-tests/032-compressed-nodatasum/compressed_extent_without_csum.raw.xz
 create mode 100755 tests/fsck-tests/032-compressed-nodatasum/test.sh

-- 
2.17.0


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 0/3] btrfs-progs: Detect compressed extent without csum
@ 2018-05-14  6:54 Qu Wenruo
  2018-09-11 15:58 ` David Sterba
  0 siblings, 1 reply; 9+ messages in thread
From: Qu Wenruo @ 2018-05-14  6:54 UTC (permalink / raw)
  To: linux-btrfs

Patches can be fetch from github:
https://github.com/adam900710/btrfs-progs/tree/compress_nodatasum

It's based on v4.16 stable branch.

James Harvey from mail list reports a strange kernel panic, whichs show
obviously kernel memory corruption, while after btrfs decompression
failure.

It turns out that, some compressed extent get corrupted on-disk, while
the inode has NODATASUM set, there is no csum to prevent corrupted
mirror being used.

Although the root cause should be buggy lzo implementation, it still
shows that btrfs is not following the behavior defined in btrfs(5):

     Note
     If nodatacow or nodatasum are enabled, compression is disabled.

So at least make btrfs check to detect such problem.

Qu Wenruo (3):
  btrfs-progs: check/lowmem: Add checks for compressed extent without
    csum
  btrfs-progs: check/original: Add checks for compressed extent without
    csum
  btrfs-progs: fsck-tests: Add test case for detecting compressed extent
    without csum

 check/main.c                                  |  10 ++++++--
 check/mode-lowmem.c                           |  18 +++++++++++++
 .../compressed_extent_without_csum.raw.xz     | Bin 0 -> 21996 bytes
 .../032-compressed-nodatasum/test.sh          |  24 ++++++++++++++++++
 4 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 tests/fsck-tests/032-compressed-nodatasum/compressed_extent_without_csum.raw.xz
 create mode 100755 tests/fsck-tests/032-compressed-nodatasum/test.sh

-- 
2.17.0


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

end of thread, other threads:[~2018-09-12  5:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14  7:03 [PATCH 0/3] btrfs-progs: Detect compressed extent without csum Qu Wenruo
2018-05-14  7:03 ` [PATCH 1/3] btrfs-progs: check/lowmem: Add checks for " Qu Wenruo
2018-05-14  7:24   ` Su Yue
2018-05-14  7:03 ` [PATCH 2/3] btrfs-progs: check/original: " Qu Wenruo
2018-05-14  7:24   ` Su Yue
2018-05-14  7:03 ` [PATCH 3/3] btrfs-progs: fsck-tests: Add test case for detecting " Qu Wenruo
  -- strict thread matches above, loose matches on Subject: below --
2018-05-14  6:54 [PATCH 0/3] btrfs-progs: Detect " Qu Wenruo
2018-09-11 15:58 ` David Sterba
2018-09-12  0:08   ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.