On Sat, Apr 13, 2019 at 12:46:28AM +0200, Christoph Anton Mitterer wrote:
> On Wed, 2019-03-20 at 10:59 +0100, Johannes Thumshirn wrote:
> > First of all, have you tried a more recent kernel than the Debian
> > kernels you referenced? E.g. Linus' current master or David's misc-
> > next
> > branch? Just so we don't try to hunt down a bug that's already fixed.
>
> I haven't and that's a bit difficult for me unless it's packaged by the
> distro (policy reasons).
>
>
> Also giving out the image is a bit problematic as it's huge (8TB).
>
> > Also if you can still reproduce the bug, please activate tracing in
> > btrfs and send the trace output.
>
> How would I do that?
>
>
> In the meantime, I think I can reproduce it with fresh images so could
> you try the following:
>
> # truncate --size 1G image
> # mkfs.btrfs image
>
> # mount -o compress image /mnt
> # cd /mnt
>
> # # create some data e.g.:
> # tar xaf /usr/src/linux-source-4.19.tar.xz
> # cd
> # umount /mnt
>
> # losetup -r -f image
> # mount -o compress /dev/loop0 /mnt
>
> # find /mnt -type f -exec filefrag -v {} \;
>
I'll give it a try.
>
> And there your kernel log will explode ;-)
>
> The culprit seems to be the device itself being read-only i.e.
> losetup's -r, respectively blockdev --setro DEVICE which I've used
> previously.
>
> If you repeat the above from the losetup point, but with -r ...
> everything works fine.
> Haven't checked whether -o compress actually makes a difference.
>
>
> Cheers,
> Chris.
>
>
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@xxxxxxx +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850