Message ID | cover.1664869157.git.wqu@suse.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs-progs: mkfs: --rootdir related fixes | expand |
On Tue, Oct 04, 2022 at 03:43:37PM +0800, Qu Wenruo wrote: > I don't know if it's recent kernel tmpfs change or something else, but > I'm consistently get ino number smaller than 256 from my /tmp directory. > > This behavior change exposed a new problem in mkfs.btrfs --rootdir, that > if some ino number (in the source directory, not in btrfs) is smaller > than 256, it can screw up the backref code. > > As backref code is utilizing @owner to determine if a backref is data or > metadata. > > And inode number smaller than 256 will make backref code to treat a data > backref as tree backref, and cause corruption. > > Thankfully this should not happen that easily, only when --rootdir > points to a newly created fs. > > Qu Wenruo (2): > btrfs-progs: properly initialized extent generation for > __btrfs_record_file_extent() > btrfs-progs: avoid fs corruption if rootdir contains ino smaller than > BTRFS_FIRST_FREE_OBJECTID Added to devel, thanks.