Re: [PATCH] btrfs-progs: Correct check_running_fs_exclop() return value

From
Goldwyn Rodrigues <hidden>
Date
2021-07-01 21:29:22
Reply to
David Sterba, 2021-07-01
On 21:21 01/07, David Sterba wrote:
On Mon, Jun 28, 2021 at 02:40:00PM -0500, Goldwyn Rodrigues wrote:
quoted
check_running_fs_exclop() can return 1 when exclop is changed to "none"
The ret is set by the return value of the select() operation. Checking
the exclusive op changes just the exclop variable while ret is still
set to 1.

Set ret = 0 if exclop is set to BTRFS_EXCL_NONE or BTRFS_EXCL_UNKNOWN.
Remove unnecessary continue statement at the end of the block.
That's describing what the code does in words, but there must be some
user visible effects like failed command. Do you have some reproducer?

I've applied patch as it's a fix but would still like to update the
changelog.
If check_running_fs_exclop() returns anything but zero, it would exit
immediately and the ioctl, for which the program is called, is not
executed, without any error notice. IOW, the command appears to have
executed, but does not. This was found when balance which typically
reports chunks relocated did not print anything on screen.

-- 
Goldwyn
Thread (3 messages) 3 messages, 2 authors, last reply 2021-07-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help