xfs_db bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I'm encountering what I believe to be a bug in xfs_db with some code
that worked previously for me. I have some code that uses xfs_db to
copy some specific data out of an XFS disk image based on an inode
number. Basically, it does similar to:

inode [inodenum]
dblock 0
p
dblock 1
p
dblock 2
p
[etc]

This worked on older versions of xfs_db but is now resulting in
corrupted output. I believe I've traced the issue to the code
introduced in https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=b05a31722f5d4c5e071238cbedf491d5b109f278
to support realtime files.

Specifically, the use of a `dblock` command when the previous command
was not an `inode` command looks to lead to the data in
iocur_top->data to no longer contain inode data as expected in the
line
if (is_rtfile(iocur_top->data))

I don't know the code well enough to submit a fix, but some quick
experimentation suggested it may be sufficient to move the check for
an rtfile to inside the push/pop context above after the call to
set_cur_inode(iocur_top->ino).

Hopefully this describes the issue sufficiently but please let me know
if you need anything else from me.

-Tom Samstag
NetRise.io




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux