Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>,
	jordan.j@mail.bg, linux-btrfs@vger.kernel.org
Subject: Re: btrfs-convert on 24Gb image corrupts files.
Date: Mon, 6 May 2024 08:33:12 +0800	[thread overview]
Message-ID: <14d29830-d369-4112-a684-b862f7b1f139@oracle.com> (raw)
In-Reply-To: <f6aca430-55fe-433c-93ef-4fb2efc19ec5@gmx.com>



On 5/5/24 13:54, Qu Wenruo wrote:
> 
> 
> 在 2024/5/5 10:26, Anand Jain 写道:
>>
>>> on ext4:
>>>
>>> ilefrag -v
>>> m/root/.mozilla/firefox/s554srh9.default-release/storage/permanent/chrome/idb/3561288849sdhlie.sqlite
>>> Filesystem type is: ef53
>>> File size of
>>> m/root/.mozilla/firefox/s554srh9.default-release/storage/permanent/chrome/idb/3561288849sdhlie.sqlite is 49152 (12 blocks of 4096 bytes)
>>>   ext:     logical_offset:        physical_offset: length:   expected:
>>> flags:
>>>     0:        0..       1:    2217003..   2217004:      2:
>>>     1:        2..      10:    2217019..   2217027:      9:    2217005:
>>>     2:       11..      11:    2217028..   2217028:      1:
>>> last,unwritten,eof
>>> m/root/.mozilla/firefox/s554srh9.default-release/storage/permanent/chrome/idb/3561288849sdhlie.sqlite: 2 extents found
>>>
>>
>>
>> btrfs-convert doesn't support ext4's "unwritten" extents. V2 of the fix
>> is in progress.
>>
>>    [PATCH 0/4] btrfs-progs: add support ext4 unwritten file extent
> 
> But the reporter also tried your patchset already:
> 
>  > *********
>  >
>  > Tried the four patches from:
> https://lore.kernel.org/linux-btrfs/6d2a19ced4551bfcf2a5d841921af7f84c4ea950.1714722726.git.anand.jain@oracle.com/
> 
>  > on the https://github.com/kdave/btrfs-progs.git tree - no change.
>  >
>  > **********
> 
> Any clue why it doesn't work?
> 
> Anyway, for now I'd prefer to change those unwritten extents just to holes.
> 
> Remember every file extent is shared between the inode and the ext4
> image, meaning even if we created the preallocated extents correctly,
> any newer write would be COWed anyway.
> 
> Thus for now, I believe changing the unwritten extents to holes would be
> much easier.
> 

Ah. I missed that part. Thanks for highlighting.

The data size and extent size might not align. In v2, I'll detect
this and handle it. I'm still figuring out how to split merged
blocks into separate extents, so that prealloc flag/as a hole
can be set on only appropriate extent size.

Thanks, Anand

> Thanks,
> Qu
>>
>>
>> Thanks, Anand
>>

  reply	other threads:[~2024-05-06  0:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05  0:34 btrfs-convert on 24Gb image corrupts files jordan.j
2024-05-05  0:50 ` Qu Wenruo
2024-05-05  0:56 ` Anand Jain
2024-05-05  5:54   ` Qu Wenruo
2024-05-06  0:33     ` Anand Jain [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-05 15:05 Yordan
2024-05-05 22:31 ` Qu Wenruo
2024-05-05 22:30 You can reproduce it yourself now Yordan
2024-05-06 10:53 ` btrfs-convert on 24Gb image corrupts files Yordan
2024-05-06 13:17   ` Anand Jain
2024-05-06 13:35     ` Yordan
2024-05-06 13:43       ` Anand Jain
2024-05-06 14:57         ` Yordan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14d29830-d369-4112-a684-b862f7b1f139@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=jordan.j@mail.bg \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox