Re: On Removing BUG_ON macros

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

 



To reduce the number of such BUG_ON usages, the code will be more robust,
which results in increasing the number of Btrfs production use.
(This is one of the way, off course.)

But, as you pointed out, removing such BUG_ONs is tricky...

> static int foo = 1;
>
> path = btrfs_alloc_path();
> if (!path || !(foo % 1000))
>        return -ENOMEM;
> foo++;

Is this a debugging idiom?
I cannot understand why this idiom can be used to catch all the callers.
Would you explain more about it?

Thank you,

-- 
Yoshinori Sano <yoshinori.sano@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux