Re: [bug report] dm-pcache: add persistent cache target in device-mapper

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

 




在 8/29/2025 5:14 PM, Dan Carpenter 写道:
On Fri, Aug 29, 2025 at 02:03:36PM +0800, Dongsheng Yang wrote:
在 8/29/2025 1:39 PM, Dan Carpenter 写道:
Hello Dongsheng Yang,

Commit 1d57628ff95b ("dm-pcache: add persistent cache target in
device-mapper") from Aug 12, 2025 (linux-next), leads to the
following Smatch static checker warning:

	drivers/md/dm-pcache/cache_segment.c:263 cache_seg_gen_increase()
	warn: sleeping in atomic context

Hi Dan,

     Thanx for your report, I will send out the patch after my testing
finished.

BTW, can you share the Smatch checking command or script? I want to add

Smatch check in my testing suit if possible, I did not found this kind of
problem with simple:

make CHECK="smatch -p=kernel" C=1 M=drivers/md/dm-pcache

It requires several rebuilds of the cross function database...  Everytime
you rebuild then it does:

First build: cache_data_alloc() disables preemption calls cache_seg_put()
Second build: cache_seg_put() calls cache_seg_invalidate()
Third build: cache_seg_invalidate() calls cache_seg_gen_increase()

Rebuilding the databse takes hours and hours.

~/path/to/smatch/smatch_scripts/build_kernel_data.sh


Thanx for  your share, I will give it a try, it seems really found issue I did not hit in my testing.


regards,
dan carpenter





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux