* flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb @ 2020-09-02 16:04 Mike Snitzer 2020-09-02 16:40 ` Coly Li 0 siblings, 1 reply; 15+ messages in thread From: Mike Snitzer @ 2020-09-02 16:04 UTC (permalink / raw) To: Coly Li, Jan Kara, Ira Weiny, Pankaj Gupta, Vishal Verma Cc: linux-nvdimm, dm-devel 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in __generic_fsdax_supported()") switched from pr_debug() to pr_info(). The justification in the commit header is really inadequate. If there is a problem that you need to drill in on, repeat the testing after enabling the dynamic debugging. Otherwise, now all DM devices that aren't layered on DAX capable devices spew really confusing noise to users when they simply activate their non-DAX DM devices: [66567.129798] dm-6: error: dax access failed (-5) [66567.134400] dm-6: error: dax access failed (-5) [66567.139152] dm-6: error: dax access failed (-5) [66567.314546] dm-2: error: dax access failed (-95) [66567.319380] dm-2: error: dax access failed (-95) [66567.324254] dm-2: error: dax access failed (-95) [66567.479025] dm-2: error: dax access failed (-95) [66567.483713] dm-2: error: dax access failed (-95) [66567.488722] dm-2: error: dax access failed (-95) [66567.494061] dm-2: error: dax access failed (-95) [66567.498823] dm-2: error: dax access failed (-95) [66567.503693] dm-2: error: dax access failed (-95) commit 231609785cbfb must be reverted. Please advise, thanks. Mike _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:04 flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb Mike Snitzer @ 2020-09-02 16:40 ` Coly Li 2020-09-02 16:44 ` Mike Snitzer 2020-09-02 23:05 ` Verma, Vishal L 0 siblings, 2 replies; 15+ messages in thread From: Coly Li @ 2020-09-02 16:40 UTC (permalink / raw) To: Mike Snitzer, Jan Kara, Ira Weiny, Pankaj Gupta, Vishal Verma Cc: linux-nvdimm, dm-devel On 2020/9/3 00:04, Mike Snitzer wrote: > 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in > __generic_fsdax_supported()") switched from pr_debug() to pr_info(). > > The justification in the commit header is really inadequate. If there > is a problem that you need to drill in on, repeat the testing after > enabling the dynamic debugging. > > Otherwise, now all DM devices that aren't layered on DAX capable devices > spew really confusing noise to users when they simply activate their > non-DAX DM devices: > > [66567.129798] dm-6: error: dax access failed (-5) > [66567.134400] dm-6: error: dax access failed (-5) > [66567.139152] dm-6: error: dax access failed (-5) > [66567.314546] dm-2: error: dax access failed (-95) > [66567.319380] dm-2: error: dax access failed (-95) > [66567.324254] dm-2: error: dax access failed (-95) > [66567.479025] dm-2: error: dax access failed (-95) > [66567.483713] dm-2: error: dax access failed (-95) > [66567.488722] dm-2: error: dax access failed (-95) > [66567.494061] dm-2: error: dax access failed (-95) > [66567.498823] dm-2: error: dax access failed (-95) > [66567.503693] dm-2: error: dax access failed (-95) > > commit 231609785cbfb must be reverted. > > Please advise, thanks. Adrian Huang from Lenovo posted a patch, which titled: dax: do not print error message for non-persistent memory block device It fixes the issue, but no response for now. Maybe we should take this fix. Thanks. Coly Li _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:40 ` Coly Li @ 2020-09-02 16:44 ` Mike Snitzer 2020-09-02 16:46 ` Coly Li 2020-09-02 23:05 ` Verma, Vishal L 1 sibling, 1 reply; 15+ messages in thread From: Mike Snitzer @ 2020-09-02 16:44 UTC (permalink / raw) To: Coly Li; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm, dm-devel On Wed, Sep 02 2020 at 12:40pm -0400, Coly Li <colyli@suse.de> wrote: > On 2020/9/3 00:04, Mike Snitzer wrote: > > 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in > > __generic_fsdax_supported()") switched from pr_debug() to pr_info(). > > > > The justification in the commit header is really inadequate. If there > > is a problem that you need to drill in on, repeat the testing after > > enabling the dynamic debugging. > > > > Otherwise, now all DM devices that aren't layered on DAX capable devices > > spew really confusing noise to users when they simply activate their > > non-DAX DM devices: > > > > [66567.129798] dm-6: error: dax access failed (-5) > > [66567.134400] dm-6: error: dax access failed (-5) > > [66567.139152] dm-6: error: dax access failed (-5) > > [66567.314546] dm-2: error: dax access failed (-95) > > [66567.319380] dm-2: error: dax access failed (-95) > > [66567.324254] dm-2: error: dax access failed (-95) > > [66567.479025] dm-2: error: dax access failed (-95) > > [66567.483713] dm-2: error: dax access failed (-95) > > [66567.488722] dm-2: error: dax access failed (-95) > > [66567.494061] dm-2: error: dax access failed (-95) > > [66567.498823] dm-2: error: dax access failed (-95) > > [66567.503693] dm-2: error: dax access failed (-95) > > > > commit 231609785cbfb must be reverted. > > > > Please advise, thanks. > > Adrian Huang from Lenovo posted a patch, which titled: dax: do not print > error message for non-persistent memory block device > > It fixes the issue, but no response for now. Maybe we should take this fix. OK, yes sounds like it. It was merged and is commit c2affe920b0e066 ("dax: do not print error message for non-persistent memory block device") Thanks for the info. Mike _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:44 ` Mike Snitzer @ 2020-09-02 16:46 ` Coly Li 2020-09-02 16:51 ` Mike Snitzer 0 siblings, 1 reply; 15+ messages in thread From: Coly Li @ 2020-09-02 16:46 UTC (permalink / raw) To: Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm, dm-devel On 2020/9/3 00:44, Mike Snitzer wrote: > On Wed, Sep 02 2020 at 12:40pm -0400, > Coly Li <colyli@suse.de> wrote: > >> On 2020/9/3 00:04, Mike Snitzer wrote: >>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in >>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>> >>> The justification in the commit header is really inadequate. If there >>> is a problem that you need to drill in on, repeat the testing after >>> enabling the dynamic debugging. >>> >>> Otherwise, now all DM devices that aren't layered on DAX capable devices >>> spew really confusing noise to users when they simply activate their >>> non-DAX DM devices: >>> >>> [66567.129798] dm-6: error: dax access failed (-5) >>> [66567.134400] dm-6: error: dax access failed (-5) >>> [66567.139152] dm-6: error: dax access failed (-5) >>> [66567.314546] dm-2: error: dax access failed (-95) >>> [66567.319380] dm-2: error: dax access failed (-95) >>> [66567.324254] dm-2: error: dax access failed (-95) >>> [66567.479025] dm-2: error: dax access failed (-95) >>> [66567.483713] dm-2: error: dax access failed (-95) >>> [66567.488722] dm-2: error: dax access failed (-95) >>> [66567.494061] dm-2: error: dax access failed (-95) >>> [66567.498823] dm-2: error: dax access failed (-95) >>> [66567.503693] dm-2: error: dax access failed (-95) >>> >>> commit 231609785cbfb must be reverted. >>> >>> Please advise, thanks. >> >> Adrian Huang from Lenovo posted a patch, which titled: dax: do not print >> error message for non-persistent memory block device >> >> It fixes the issue, but no response for now. Maybe we should take this fix. > > OK, yes sounds like it. It was merged and is commit c2affe920b0e066 > ("dax: do not print error message for non-persistent memory block > device") Thanks for informing me this patch is merged, I am going to update my local one :-) Coly Li _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:46 ` Coly Li @ 2020-09-02 16:51 ` Mike Snitzer 2020-09-02 16:53 ` Coly Li ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Mike Snitzer @ 2020-09-02 16:51 UTC (permalink / raw) To: Coly Li; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm, dm-devel On Wed, Sep 02 2020 at 12:46pm -0400, Coly Li <colyli@suse.de> wrote: > On 2020/9/3 00:44, Mike Snitzer wrote: > > On Wed, Sep 02 2020 at 12:40pm -0400, > > Coly Li <colyli@suse.de> wrote: > > > >> On 2020/9/3 00:04, Mike Snitzer wrote: > >>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in > >>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). > >>> > >>> The justification in the commit header is really inadequate. If there > >>> is a problem that you need to drill in on, repeat the testing after > >>> enabling the dynamic debugging. > >>> > >>> Otherwise, now all DM devices that aren't layered on DAX capable devices > >>> spew really confusing noise to users when they simply activate their > >>> non-DAX DM devices: > >>> > >>> [66567.129798] dm-6: error: dax access failed (-5) > >>> [66567.134400] dm-6: error: dax access failed (-5) > >>> [66567.139152] dm-6: error: dax access failed (-5) > >>> [66567.314546] dm-2: error: dax access failed (-95) > >>> [66567.319380] dm-2: error: dax access failed (-95) > >>> [66567.324254] dm-2: error: dax access failed (-95) > >>> [66567.479025] dm-2: error: dax access failed (-95) > >>> [66567.483713] dm-2: error: dax access failed (-95) > >>> [66567.488722] dm-2: error: dax access failed (-95) > >>> [66567.494061] dm-2: error: dax access failed (-95) > >>> [66567.498823] dm-2: error: dax access failed (-95) > >>> [66567.503693] dm-2: error: dax access failed (-95) > >>> > >>> commit 231609785cbfb must be reverted. > >>> > >>> Please advise, thanks. > >> > >> Adrian Huang from Lenovo posted a patch, which titled: dax: do not print > >> error message for non-persistent memory block device > >> > >> It fixes the issue, but no response for now. Maybe we should take this fix. > > > > OK, yes sounds like it. It was merged and is commit c2affe920b0e066 > > ("dax: do not print error message for non-persistent memory block > > device") > > Thanks for informing me this patch is merged, I am going to update my > local one :-) So the thing is I'm running v5.9-rc3 (which includes this commit) but I'm still seeing all these warnings when I run the lvm2 testsuite. The reason _seems_ to be because the lvm2 testsuite uses brd devices for test devices. So there is something about the brd device that shows commit c2affe920b0e066 isn't enough :( Mike _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:51 ` Mike Snitzer @ 2020-09-02 16:53 ` Coly Li 2020-09-03 5:05 ` Coly Li 2020-09-03 5:20 ` Coly Li 2 siblings, 0 replies; 15+ messages in thread From: Coly Li @ 2020-09-02 16:53 UTC (permalink / raw) To: Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm, dm-devel On 2020/9/3 00:51, Mike Snitzer wrote: > On Wed, Sep 02 2020 at 12:46pm -0400, > Coly Li <colyli@suse.de> wrote: > >> On 2020/9/3 00:44, Mike Snitzer wrote: >>> On Wed, Sep 02 2020 at 12:40pm -0400, >>> Coly Li <colyli@suse.de> wrote: >>> >>>> On 2020/9/3 00:04, Mike Snitzer wrote: >>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in >>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>>>> >>>>> The justification in the commit header is really inadequate. If there >>>>> is a problem that you need to drill in on, repeat the testing after >>>>> enabling the dynamic debugging. >>>>> >>>>> Otherwise, now all DM devices that aren't layered on DAX capable devices >>>>> spew really confusing noise to users when they simply activate their >>>>> non-DAX DM devices: >>>>> >>>>> [66567.129798] dm-6: error: dax access failed (-5) >>>>> [66567.134400] dm-6: error: dax access failed (-5) >>>>> [66567.139152] dm-6: error: dax access failed (-5) >>>>> [66567.314546] dm-2: error: dax access failed (-95) >>>>> [66567.319380] dm-2: error: dax access failed (-95) >>>>> [66567.324254] dm-2: error: dax access failed (-95) >>>>> [66567.479025] dm-2: error: dax access failed (-95) >>>>> [66567.483713] dm-2: error: dax access failed (-95) >>>>> [66567.488722] dm-2: error: dax access failed (-95) >>>>> [66567.494061] dm-2: error: dax access failed (-95) >>>>> [66567.498823] dm-2: error: dax access failed (-95) >>>>> [66567.503693] dm-2: error: dax access failed (-95) >>>>> >>>>> commit 231609785cbfb must be reverted. >>>>> >>>>> Please advise, thanks. >>>> >>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not print >>>> error message for non-persistent memory block device >>>> >>>> It fixes the issue, but no response for now. Maybe we should take this fix. >>> >>> OK, yes sounds like it. It was merged and is commit c2affe920b0e066 >>> ("dax: do not print error message for non-persistent memory block >>> device") >> >> Thanks for informing me this patch is merged, I am going to update my >> local one :-) > > So the thing is I'm running v5.9-rc3 (which includes this commit) but > I'm still seeing all these warnings when I run the lvm2 testsuite. The > reason _seems_ to be because the lvm2 testsuite uses brd devices for > test devices. So there is something about the brd device that shows > commit c2affe920b0e066 isn't enough :( Let me take a look. Thanks for reminding me. Coly Li _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:51 ` Mike Snitzer 2020-09-02 16:53 ` Coly Li @ 2020-09-03 5:05 ` Coly Li 2020-09-03 5:20 ` Coly Li 2 siblings, 0 replies; 15+ messages in thread From: Coly Li @ 2020-09-03 5:05 UTC (permalink / raw) To: Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm, dm-devel [-- Attachment #1: Type: text/plain, Size: 2780 bytes --] On 2020/9/3 00:51, Mike Snitzer wrote: > On Wed, Sep 02 2020 at 12:46pm -0400, > Coly Li <colyli@suse.de> wrote: > >> On 2020/9/3 00:44, Mike Snitzer wrote: >>> On Wed, Sep 02 2020 at 12:40pm -0400, >>> Coly Li <colyli@suse.de> wrote: >>> >>>> On 2020/9/3 00:04, Mike Snitzer wrote: >>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in >>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>>>> >>>>> The justification in the commit header is really inadequate. If there >>>>> is a problem that you need to drill in on, repeat the testing after >>>>> enabling the dynamic debugging. >>>>> >>>>> Otherwise, now all DM devices that aren't layered on DAX capable devices >>>>> spew really confusing noise to users when they simply activate their >>>>> non-DAX DM devices: >>>>> >>>>> [66567.129798] dm-6: error: dax access failed (-5) >>>>> [66567.134400] dm-6: error: dax access failed (-5) >>>>> [66567.139152] dm-6: error: dax access failed (-5) >>>>> [66567.314546] dm-2: error: dax access failed (-95) >>>>> [66567.319380] dm-2: error: dax access failed (-95) >>>>> [66567.324254] dm-2: error: dax access failed (-95) >>>>> [66567.479025] dm-2: error: dax access failed (-95) >>>>> [66567.483713] dm-2: error: dax access failed (-95) >>>>> [66567.488722] dm-2: error: dax access failed (-95) >>>>> [66567.494061] dm-2: error: dax access failed (-95) >>>>> [66567.498823] dm-2: error: dax access failed (-95) >>>>> [66567.503693] dm-2: error: dax access failed (-95) >>>>> >>>>> commit 231609785cbfb must be reverted. >>>>> >>>>> Please advise, thanks. >>>> >>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not print >>>> error message for non-persistent memory block device >>>> >>>> It fixes the issue, but no response for now. Maybe we should take this fix. >>> >>> OK, yes sounds like it. It was merged and is commit c2affe920b0e066 >>> ("dax: do not print error message for non-persistent memory block >>> device") >> >> Thanks for informing me this patch is merged, I am going to update my >> local one :-) > > So the thing is I'm running v5.9-rc3 (which includes this commit) but > I'm still seeing all these warnings when I run the lvm2 testsuite. The > reason _seems_ to be because the lvm2 testsuite uses brd devices for > test devices. So there is something about the brd device that shows > commit c2affe920b0e066 isn't enough :( Could you please apply and test this attached patch based on v5.9-rc3 ? It seems the pointer dax_dev of __generic_fsdax_supported() parameter is not initialized (IMHO this is not a dm bug), therefore the && should be || to check the dax support state. Also I add two pr_info() to print the variables value, let's see whether my guess makes sense. Thanks. Coly Li [-- Attachment #2: 0001-dax-fix-for-do-not-print-error-message-for-non-persi.patch --] [-- Type: text/plain, Size: 1183 bytes --] From 3714b91362669c4d3e281acfe197e922a1dd1b4a Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Thu, 3 Sep 2020 12:25:13 +0800 Subject: [PATCH] dax: fix for do not print error message for non-persistent memory block device When calling __generic_fsdax_supported(), a dax-unsupported device may not have dax_dev as NULL. Therefore even dax_dev is not NULL, it is still necessary to call bdev_dax_supported() to check whether the device supports dax. Signed-off-by: Coly Li <colyli@suse.de> --- drivers/dax/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 32642634c1bb..a5bdfca0529a 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -100,7 +100,9 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev, return false; } - if (!dax_dev && !bdev_dax_supported(bdev, blocksize)) { + pr_info("dax_dev: %p\n", dax_dev); + pr_info("bdev_dax_supported(): %d\n", bdev_dax_supported(bdev, blocksize)); + if (!dax_dev || !bdev_dax_supported(bdev, blocksize)) { pr_debug("%s: error: dax unsupported by block device\n", bdevname(bdev, buf)); return false; -- 2.26.2 [-- Attachment #3: Type: text/plain, Size: 167 bytes --] _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:51 ` Mike Snitzer 2020-09-02 16:53 ` Coly Li 2020-09-03 5:05 ` Coly Li @ 2020-09-03 5:20 ` Coly Li 2020-09-03 8:37 ` Coly Li 2020-09-03 11:09 ` Adrian Huang12 2 siblings, 2 replies; 15+ messages in thread From: Coly Li @ 2020-09-03 5:20 UTC (permalink / raw) To: Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm, Adrian Huang12 [-- Attachment #1: Type: text/plain, Size: 2821 bytes --] On 2020/9/3 00:51, Mike Snitzer wrote: > On Wed, Sep 02 2020 at 12:46pm -0400, > Coly Li <colyli@suse.de> wrote: > >> On 2020/9/3 00:44, Mike Snitzer wrote: >>> On Wed, Sep 02 2020 at 12:40pm -0400, >>> Coly Li <colyli@suse.de> wrote: >>> >>>> On 2020/9/3 00:04, Mike Snitzer wrote: >>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in >>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>>>> >>>>> The justification in the commit header is really inadequate. If there >>>>> is a problem that you need to drill in on, repeat the testing after >>>>> enabling the dynamic debugging. >>>>> >>>>> Otherwise, now all DM devices that aren't layered on DAX capable devices >>>>> spew really confusing noise to users when they simply activate their >>>>> non-DAX DM devices: >>>>> >>>>> [66567.129798] dm-6: error: dax access failed (-5) >>>>> [66567.134400] dm-6: error: dax access failed (-5) >>>>> [66567.139152] dm-6: error: dax access failed (-5) >>>>> [66567.314546] dm-2: error: dax access failed (-95) >>>>> [66567.319380] dm-2: error: dax access failed (-95) >>>>> [66567.324254] dm-2: error: dax access failed (-95) >>>>> [66567.479025] dm-2: error: dax access failed (-95) >>>>> [66567.483713] dm-2: error: dax access failed (-95) >>>>> [66567.488722] dm-2: error: dax access failed (-95) >>>>> [66567.494061] dm-2: error: dax access failed (-95) >>>>> [66567.498823] dm-2: error: dax access failed (-95) >>>>> [66567.503693] dm-2: error: dax access failed (-95) >>>>> >>>>> commit 231609785cbfb must be reverted. >>>>> >>>>> Please advise, thanks. >>>> >>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not print >>>> error message for non-persistent memory block device >>>> >>>> It fixes the issue, but no response for now. Maybe we should take this fix. >>> >>> OK, yes sounds like it. It was merged and is commit c2affe920b0e066 >>> ("dax: do not print error message for non-persistent memory block >>> device") >> >> Thanks for informing me this patch is merged, I am going to update my >> local one :-) > > So the thing is I'm running v5.9-rc3 (which includes this commit) but > I'm still seeing all these warnings when I run the lvm2 testsuite. The > reason _seems_ to be because the lvm2 testsuite uses brd devices for > test devices. So there is something about the brd device that shows > commit c2affe920b0e066 isn't enough :( [Resend and CC Adrian Huang] Hi Mike, Could you please apply and test this attached patch based on v5.9-rc3 ? It seems the pointer dax_dev of __generic_fsdax_supported() parameter is not initialized (IMHO this is not a dm bug), therefore the && should be || to check the dax support state. Also I add two pr_info() to print the variables value, let's see whether my guess makes sense. Thanks. Coly Li [-- Attachment #2: 0001-dax-fix-for-do-not-print-error-message-for-non-persi.patch --] [-- Type: text/plain, Size: 1183 bytes --] From 3714b91362669c4d3e281acfe197e922a1dd1b4a Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Thu, 3 Sep 2020 12:25:13 +0800 Subject: [PATCH] dax: fix for do not print error message for non-persistent memory block device When calling __generic_fsdax_supported(), a dax-unsupported device may not have dax_dev as NULL. Therefore even dax_dev is not NULL, it is still necessary to call bdev_dax_supported() to check whether the device supports dax. Signed-off-by: Coly Li <colyli@suse.de> --- drivers/dax/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 32642634c1bb..a5bdfca0529a 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -100,7 +100,9 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev, return false; } - if (!dax_dev && !bdev_dax_supported(bdev, blocksize)) { + pr_info("dax_dev: %p\n", dax_dev); + pr_info("bdev_dax_supported(): %d\n", bdev_dax_supported(bdev, blocksize)); + if (!dax_dev || !bdev_dax_supported(bdev, blocksize)) { pr_debug("%s: error: dax unsupported by block device\n", bdevname(bdev, buf)); return false; -- 2.26.2 [-- Attachment #3: Type: text/plain, Size: 167 bytes --] _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-03 5:20 ` Coly Li @ 2020-09-03 8:37 ` Coly Li 2020-09-03 11:24 ` [External] " Adrian Huang12 2020-09-03 11:09 ` Adrian Huang12 1 sibling, 1 reply; 15+ messages in thread From: Coly Li @ 2020-09-03 8:37 UTC (permalink / raw) To: Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm, Adrian Huang12 On 2020/9/3 13:20, Coly Li wrote: > On 2020/9/3 00:51, Mike Snitzer wrote: >> On Wed, Sep 02 2020 at 12:46pm -0400, >> Coly Li <colyli@suse.de> wrote: >> >>> On 2020/9/3 00:44, Mike Snitzer wrote: >>>> On Wed, Sep 02 2020 at 12:40pm -0400, >>>> Coly Li <colyli@suse.de> wrote: >>>> >>>>> On 2020/9/3 00:04, Mike Snitzer wrote: >>>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in >>>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>>>>> >>>>>> The justification in the commit header is really inadequate. If there >>>>>> is a problem that you need to drill in on, repeat the testing after >>>>>> enabling the dynamic debugging. >>>>>> >>>>>> Otherwise, now all DM devices that aren't layered on DAX capable devices >>>>>> spew really confusing noise to users when they simply activate their >>>>>> non-DAX DM devices: >>>>>> >>>>>> [66567.129798] dm-6: error: dax access failed (-5) >>>>>> [66567.134400] dm-6: error: dax access failed (-5) >>>>>> [66567.139152] dm-6: error: dax access failed (-5) >>>>>> [66567.314546] dm-2: error: dax access failed (-95) >>>>>> [66567.319380] dm-2: error: dax access failed (-95) >>>>>> [66567.324254] dm-2: error: dax access failed (-95) >>>>>> [66567.479025] dm-2: error: dax access failed (-95) >>>>>> [66567.483713] dm-2: error: dax access failed (-95) >>>>>> [66567.488722] dm-2: error: dax access failed (-95) >>>>>> [66567.494061] dm-2: error: dax access failed (-95) >>>>>> [66567.498823] dm-2: error: dax access failed (-95) >>>>>> [66567.503693] dm-2: error: dax access failed (-95) >>>>>> >>>>>> commit 231609785cbfb must be reverted. >>>>>> >>>>>> Please advise, thanks. >>>>> >>>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not print >>>>> error message for non-persistent memory block device >>>>> >>>>> It fixes the issue, but no response for now. Maybe we should take this fix. >>>> >>>> OK, yes sounds like it. It was merged and is commit c2affe920b0e066 >>>> ("dax: do not print error message for non-persistent memory block >>>> device") >>> >>> Thanks for informing me this patch is merged, I am going to update my >>> local one :-) >> >> So the thing is I'm running v5.9-rc3 (which includes this commit) but >> I'm still seeing all these warnings when I run the lvm2 testsuite. The >> reason _seems_ to be because the lvm2 testsuite uses brd devices for >> test devices. So there is something about the brd device that shows >> commit c2affe920b0e066 isn't enough :( > > [Resend and CC Adrian Huang] > > Hi Mike, > > Could you please apply and test this attached patch based on v5.9-rc3 ? > > It seems the pointer dax_dev of __generic_fsdax_supported() parameter is > not initialized (IMHO this is not a dm bug), therefore the && should be > || to check the dax support state. > > Also I add two pr_info() to print the variables value, let's see whether > my guess makes sense. Also I suggest some kind of change like this in drivers/md/dm.c, diff --git a/drivers/md/dm.c b/drivers/md/dm.c index fb0255d25e4b..566d8208df47 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -818,6 +818,8 @@ int dm_get_table_device(struct mapped_device *md, dev_t dev, fmode_t mode, return -ENOMEM; } + memset(td, 0, sizeof(struct table_device)); + td->dm_dev.mode = mode; td->dm_dev.bdev = NULL; The above change may make sure *dax_dev sent into __generic_fsdax_supported() is always NULL if the target does not support DAX. But IMHO this is not 100% necessary, it just make __generic_fsdax_supported() return false faster by the following change in previous attached patch, - if (!dax_dev && !bdev_dax_supported(bdev, blocksize)) { + if (!dax_dev || !bdev_dax_supported(bdev, blocksize)) { I am not very familiar with dm code, CMIIW, just for your information. Coly Li _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply related [flat|nested] 15+ messages in thread
* RE: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-03 8:37 ` Coly Li @ 2020-09-03 11:24 ` Adrian Huang12 2020-09-03 11:31 ` Coly Li 0 siblings, 1 reply; 15+ messages in thread From: Adrian Huang12 @ 2020-09-03 11:24 UTC (permalink / raw) To: Coly Li, Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm > -----Original Message----- > From: Coly Li <colyli@suse.de> > Sent: Thursday, September 3, 2020 4:37 PM > To: Mike Snitzer <snitzer@redhat.com> > Cc: Jan Kara <jack@suse.com>; Ira Weiny <ira.weiny@intel.com>; Pankaj Gupta > <pankaj.gupta.linux@gmail.com>; Vishal Verma <vishal.l.verma@intel.com>; > linux-nvdimm@lists.01.org; Adrian Huang12 <ahuang12@lenovo.com> > Subject: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 > commit 231609785cbfb > > On 2020/9/3 13:20, Coly Li wrote: > > On 2020/9/3 00:51, Mike Snitzer wrote: > >> On Wed, Sep 02 2020 at 12:46pm -0400, Coly Li <colyli@suse.de> wrote: > >> > >>> On 2020/9/3 00:44, Mike Snitzer wrote: > >>>> On Wed, Sep 02 2020 at 12:40pm -0400, Coly Li <colyli@suse.de> > >>>> wrote: > >>>> > >>>>> On 2020/9/3 00:04, Mike Snitzer wrote: > >>>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() > >>>>>> in > >>>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). > >>>>>> > >>>>>> The justification in the commit header is really inadequate. If > >>>>>> there is a problem that you need to drill in on, repeat the > >>>>>> testing after enabling the dynamic debugging. > >>>>>> > >>>>>> Otherwise, now all DM devices that aren't layered on DAX capable > >>>>>> devices spew really confusing noise to users when they simply > >>>>>> activate their non-DAX DM devices: > >>>>>> > >>>>>> [66567.129798] dm-6: error: dax access failed (-5) [66567.134400] > >>>>>> dm-6: error: dax access failed (-5) [66567.139152] dm-6: error: > >>>>>> dax access failed (-5) [66567.314546] dm-2: error: dax access > >>>>>> failed (-95) [66567.319380] dm-2: error: dax access failed (-95) > >>>>>> [66567.324254] dm-2: error: dax access failed (-95) > >>>>>> [66567.479025] dm-2: error: dax access failed (-95) > >>>>>> [66567.483713] dm-2: error: dax access failed (-95) > >>>>>> [66567.488722] dm-2: error: dax access failed (-95) > >>>>>> [66567.494061] dm-2: error: dax access failed (-95) > >>>>>> [66567.498823] dm-2: error: dax access failed (-95) > >>>>>> [66567.503693] dm-2: error: dax access failed (-95) > >>>>>> > >>>>>> commit 231609785cbfb must be reverted. > >>>>>> > >>>>>> Please advise, thanks. > >>>>> > >>>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not > >>>>> print error message for non-persistent memory block device > >>>>> > >>>>> It fixes the issue, but no response for now. Maybe we should take this fix. > >>>> > >>>> OK, yes sounds like it. It was merged and is commit > >>>> c2affe920b0e066 > >>>> ("dax: do not print error message for non-persistent memory block > >>>> device") > >>> > >>> Thanks for informing me this patch is merged, I am going to update > >>> my local one :-) > >> > >> So the thing is I'm running v5.9-rc3 (which includes this commit) but > >> I'm still seeing all these warnings when I run the lvm2 testsuite. > >> The reason _seems_ to be because the lvm2 testsuite uses brd devices > >> for test devices. So there is something about the brd device that > >> shows commit c2affe920b0e066 isn't enough :( > > > > [Resend and CC Adrian Huang] > > > > Hi Mike, > > > > Could you please apply and test this attached patch based on v5.9-rc3 ? > > > > It seems the pointer dax_dev of __generic_fsdax_supported() parameter > > is not initialized (IMHO this is not a dm bug), therefore the && > > should be > > || to check the dax support state. > > > > Also I add two pr_info() to print the variables value, let's see > > whether my guess makes sense. > > Also I suggest some kind of change like this in drivers/md/dm.c, > > diff --git a/drivers/md/dm.c b/drivers/md/dm.c index > fb0255d25e4b..566d8208df47 100644 > --- a/drivers/md/dm.c > +++ b/drivers/md/dm.c > @@ -818,6 +818,8 @@ int dm_get_table_device(struct mapped_device *md, > dev_t dev, fmode_t mode, > return -ENOMEM; > } > > + memset(td, 0, sizeof(struct table_device)); > + This does not help. See the following log. ----------------- # lvm2-testsuite --only activate-minor ....... [ 0:00] #activate-minor.sh:22+ aux prepare_vg 2 [ 0:00] ## preparing ramdisk device...ok (/dev/ram0) [ 0:01] 6,3160,150710756,-;brd: module loaded [ 0:01] ## preparing 2 devices...ok [ 0:01] 6,3161,150730864,-;dax_dev: 0000000000000000 [ 0:01] 6,3162,150730866,-;bdev_dax_supported(): 0 [ 0:01] 6,3163,150730903,-;dax_dev: 0000000000000000 [ 0:01] 6,3164,150730905,-;bdev_dax_supported(): 0 [ 0:01] 6,3165,150731019,-;dax_dev: 0000000000000000 [ 0:01] 6,3166,150731020,-;bdev_dax_supported(): 0 [ 0:01] 6,3167,150731512,-;dax_dev: 0000000000000000 [ 0:01] 6,3168,150731514,-;bdev_dax_supported(): 0 [ 0:01] 6,3169,150731525,-;dax_dev: 0000000000000000 [ 0:01] 6,3170,150731525,-;bdev_dax_supported(): 0 [ 0:01] 6,3171,150731656,-;dax_dev: 0000000000000000 [ 0:01] 6,3172,150731657,-;bdev_dax_supported(): 0 ....... [ 0:01] lvchange $vg/foo -a y [ 0:01] #activate-minor.sh:25+ lvchange LVMTEST12302vg/foo -a y [ 0:01] /tmp/LVMTEST12302.W0HGxyzxst/dev/mapper/LVMTEST12302vg-foo not set up by udev: Falling back to direct node creation. [ 0:01] 6,3173,150927070,-;dax_dev: 00000000f0a5865d [ 0:01] 6,3174,150927072,-;bdev_dax_supported(): 0 [ 0:01] 6,3175,150927081,-;dax_dev: 00000000f0a5865d [ 0:01] 6,3176,150927082,-;bdev_dax_supported(): 0 [ 0:01] 6,3177,150927241,-;dax_dev: 00000000f0a5865d [ 0:01] 6,3178,150927242,-;bdev_dax_supported(): 0 ---------------- > td->dm_dev.mode = mode; > td->dm_dev.bdev = NULL; > > > The above change may make sure *dax_dev sent into > __generic_fsdax_supported() is always NULL if the target does not support DAX. > But IMHO this is not 100% necessary, it just make > __generic_fsdax_supported() return false faster by the following change in > previous attached patch, > > - if (!dax_dev && !bdev_dax_supported(bdev, blocksize)) { > + if (!dax_dev || !bdev_dax_supported(bdev, blocksize)) { > > I am not very familiar with dm code, CMIIW, just for your information. > > Coly Li -- Adrian _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-03 11:24 ` [External] " Adrian Huang12 @ 2020-09-03 11:31 ` Coly Li 0 siblings, 0 replies; 15+ messages in thread From: Coly Li @ 2020-09-03 11:31 UTC (permalink / raw) To: Adrian Huang12; +Cc: Mike Snitzer, Jan Kara, Pankaj Gupta, linux-nvdimm On 2020/9/3 19:24, Adrian Huang12 wrote: > >> -----Original Message----- >> From: Coly Li <colyli@suse.de> >> Sent: Thursday, September 3, 2020 4:37 PM >> To: Mike Snitzer <snitzer@redhat.com> >> Cc: Jan Kara <jack@suse.com>; Ira Weiny <ira.weiny@intel.com>; Pankaj Gupta >> <pankaj.gupta.linux@gmail.com>; Vishal Verma <vishal.l.verma@intel.com>; >> linux-nvdimm@lists.01.org; Adrian Huang12 <ahuang12@lenovo.com> >> Subject: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 >> commit 231609785cbfb >> >> On 2020/9/3 13:20, Coly Li wrote: >>> On 2020/9/3 00:51, Mike Snitzer wrote: >>>> On Wed, Sep 02 2020 at 12:46pm -0400, Coly Li <colyli@suse.de> wrote: >>>> >>>>> On 2020/9/3 00:44, Mike Snitzer wrote: >>>>>> On Wed, Sep 02 2020 at 12:40pm -0400, Coly Li <colyli@suse.de> >>>>>> wrote: >>>>>> >>>>>>> On 2020/9/3 00:04, Mike Snitzer wrote: >>>>>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() >>>>>>>> in >>>>>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>>>>>>> >>>>>>>> The justification in the commit header is really inadequate. If >>>>>>>> there is a problem that you need to drill in on, repeat the >>>>>>>> testing after enabling the dynamic debugging. >>>>>>>> >>>>>>>> Otherwise, now all DM devices that aren't layered on DAX capable >>>>>>>> devices spew really confusing noise to users when they simply >>>>>>>> activate their non-DAX DM devices: >>>>>>>> >>>>>>>> [66567.129798] dm-6: error: dax access failed (-5) [66567.134400] >>>>>>>> dm-6: error: dax access failed (-5) [66567.139152] dm-6: error: >>>>>>>> dax access failed (-5) [66567.314546] dm-2: error: dax access >>>>>>>> failed (-95) [66567.319380] dm-2: error: dax access failed (-95) >>>>>>>> [66567.324254] dm-2: error: dax access failed (-95) >>>>>>>> [66567.479025] dm-2: error: dax access failed (-95) >>>>>>>> [66567.483713] dm-2: error: dax access failed (-95) >>>>>>>> [66567.488722] dm-2: error: dax access failed (-95) >>>>>>>> [66567.494061] dm-2: error: dax access failed (-95) >>>>>>>> [66567.498823] dm-2: error: dax access failed (-95) >>>>>>>> [66567.503693] dm-2: error: dax access failed (-95) >>>>>>>> >>>>>>>> commit 231609785cbfb must be reverted. >>>>>>>> >>>>>>>> Please advise, thanks. >>>>>>> >>>>>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not >>>>>>> print error message for non-persistent memory block device >>>>>>> >>>>>>> It fixes the issue, but no response for now. Maybe we should take this fix. >>>>>> >>>>>> OK, yes sounds like it. It was merged and is commit >>>>>> c2affe920b0e066 >>>>>> ("dax: do not print error message for non-persistent memory block >>>>>> device") >>>>> >>>>> Thanks for informing me this patch is merged, I am going to update >>>>> my local one :-) >>>> >>>> So the thing is I'm running v5.9-rc3 (which includes this commit) but >>>> I'm still seeing all these warnings when I run the lvm2 testsuite. >>>> The reason _seems_ to be because the lvm2 testsuite uses brd devices >>>> for test devices. So there is something about the brd device that >>>> shows commit c2affe920b0e066 isn't enough :( >>> >>> [Resend and CC Adrian Huang] >>> >>> Hi Mike, >>> >>> Could you please apply and test this attached patch based on v5.9-rc3 ? >>> >>> It seems the pointer dax_dev of __generic_fsdax_supported() parameter >>> is not initialized (IMHO this is not a dm bug), therefore the && >>> should be >>> || to check the dax support state. >>> >>> Also I add two pr_info() to print the variables value, let's see >>> whether my guess makes sense. >> >> Also I suggest some kind of change like this in drivers/md/dm.c, >> >> diff --git a/drivers/md/dm.c b/drivers/md/dm.c index >> fb0255d25e4b..566d8208df47 100644 >> --- a/drivers/md/dm.c >> +++ b/drivers/md/dm.c >> @@ -818,6 +818,8 @@ int dm_get_table_device(struct mapped_device *md, >> dev_t dev, fmode_t mode, >> return -ENOMEM; >> } >> >> + memset(td, 0, sizeof(struct table_device)); >> + > > This does not help. See the following log. > > ----------------- > # lvm2-testsuite --only activate-minor > ....... > [ 0:00] #activate-minor.sh:22+ aux prepare_vg 2 > [ 0:00] ## preparing ramdisk device...ok (/dev/ram0) > [ 0:01] 6,3160,150710756,-;brd: module loaded > [ 0:01] ## preparing 2 devices...ok > [ 0:01] 6,3161,150730864,-;dax_dev: 0000000000000000 > [ 0:01] 6,3162,150730866,-;bdev_dax_supported(): 0 > [ 0:01] 6,3163,150730903,-;dax_dev: 0000000000000000 > [ 0:01] 6,3164,150730905,-;bdev_dax_supported(): 0 > [ 0:01] 6,3165,150731019,-;dax_dev: 0000000000000000 > [ 0:01] 6,3166,150731020,-;bdev_dax_supported(): 0 > [ 0:01] 6,3167,150731512,-;dax_dev: 0000000000000000 > [ 0:01] 6,3168,150731514,-;bdev_dax_supported(): 0 > [ 0:01] 6,3169,150731525,-;dax_dev: 0000000000000000 > [ 0:01] 6,3170,150731525,-;bdev_dax_supported(): 0 > [ 0:01] 6,3171,150731656,-;dax_dev: 0000000000000000 > [ 0:01] 6,3172,150731657,-;bdev_dax_supported(): 0 > ....... > [ 0:01] lvchange $vg/foo -a y > [ 0:01] #activate-minor.sh:25+ lvchange LVMTEST12302vg/foo -a y > [ 0:01] /tmp/LVMTEST12302.W0HGxyzxst/dev/mapper/LVMTEST12302vg-foo not set up by udev: Falling back to direct node creation. > [ 0:01] 6,3173,150927070,-;dax_dev: 00000000f0a5865d > [ 0:01] 6,3174,150927072,-;bdev_dax_supported(): 0 > [ 0:01] 6,3175,150927081,-;dax_dev: 00000000f0a5865d > [ 0:01] 6,3176,150927082,-;bdev_dax_supported(): 0 > [ 0:01] 6,3177,150927241,-;dax_dev: 00000000f0a5865d > [ 0:01] 6,3178,150927242,-;bdev_dax_supported(): 0 > ---------------- It seems I didn't cache all the locations to set dax_dev pointer to NULL if the defice does not support dax. Thanks for point out of this :-) Coly Li _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-03 5:20 ` Coly Li 2020-09-03 8:37 ` Coly Li @ 2020-09-03 11:09 ` Adrian Huang12 2020-09-03 11:24 ` Coly Li 1 sibling, 1 reply; 15+ messages in thread From: Adrian Huang12 @ 2020-09-03 11:09 UTC (permalink / raw) To: Coly Li, Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm Hi Coly, > -----Original Message----- > From: Coly Li <colyli@suse.de> > Sent: Thursday, September 3, 2020 1:20 PM > To: Mike Snitzer <snitzer@redhat.com> > Cc: Jan Kara <jack@suse.com>; Ira Weiny <ira.weiny@intel.com>; Pankaj Gupta > <pankaj.gupta.linux@gmail.com>; Vishal Verma <vishal.l.verma@intel.com>; > linux-nvdimm@lists.01.org; Adrian Huang12 <ahuang12@lenovo.com> > Subject: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 > commit 231609785cbfb > > On 2020/9/3 00:51, Mike Snitzer wrote: > > On Wed, Sep 02 2020 at 12:46pm -0400, > > Coly Li <colyli@suse.de> wrote: > > > >> On 2020/9/3 00:44, Mike Snitzer wrote: > >>> On Wed, Sep 02 2020 at 12:40pm -0400, Coly Li <colyli@suse.de> > >>> wrote: > >>> > >>>> On 2020/9/3 00:04, Mike Snitzer wrote: > >>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() > >>>>> in > >>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). > >>>>> > >>>>> The justification in the commit header is really inadequate. If > >>>>> there is a problem that you need to drill in on, repeat the > >>>>> testing after enabling the dynamic debugging. > >>>>> > >>>>> Otherwise, now all DM devices that aren't layered on DAX capable > >>>>> devices spew really confusing noise to users when they simply > >>>>> activate their non-DAX DM devices: > >>>>> > >>>>> [66567.129798] dm-6: error: dax access failed (-5) [66567.134400] > >>>>> dm-6: error: dax access failed (-5) [66567.139152] dm-6: error: > >>>>> dax access failed (-5) [66567.314546] dm-2: error: dax access > >>>>> failed (-95) [66567.319380] dm-2: error: dax access failed (-95) > >>>>> [66567.324254] dm-2: error: dax access failed (-95) [66567.479025] > >>>>> dm-2: error: dax access failed (-95) [66567.483713] dm-2: error: > >>>>> dax access failed (-95) [66567.488722] dm-2: error: dax access > >>>>> failed (-95) [66567.494061] dm-2: error: dax access failed (-95) > >>>>> [66567.498823] dm-2: error: dax access failed (-95) [66567.503693] > >>>>> dm-2: error: dax access failed (-95) > >>>>> > >>>>> commit 231609785cbfb must be reverted. > >>>>> > >>>>> Please advise, thanks. > >>>> > >>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not > >>>> print error message for non-persistent memory block device > >>>> > >>>> It fixes the issue, but no response for now. Maybe we should take this fix. > >>> > >>> OK, yes sounds like it. It was merged and is commit c2affe920b0e066 > >>> ("dax: do not print error message for non-persistent memory block > >>> device") > >> > >> Thanks for informing me this patch is merged, I am going to update my > >> local one :-) > > > > So the thing is I'm running v5.9-rc3 (which includes this commit) but > > I'm still seeing all these warnings when I run the lvm2 testsuite. > > The reason _seems_ to be because the lvm2 testsuite uses brd devices > > for test devices. So there is something about the brd device that > > shows commit c2affe920b0e066 isn't enough :( > > [Resend and CC Adrian Huang] > > Hi Mike, > > Could you please apply and test this attached patch based on v5.9-rc3 ? > > It seems the pointer dax_dev of __generic_fsdax_supported() parameter is not > initialized (IMHO this is not a dm bug), therefore the && should be > || to check the dax support state. > > Also I add two pr_info() to print the variables value, let's see whether my guess > makes sense. I confirmed that Mike's symptom can be easily reproduced with brd devices after running the tool 'lvm2-testsuite'. And, Coly's right. The dax_dev pointer is *NOT* NULL when the tool executes the command ' lvchange $vg/foo -a y'. Please see the following log (with applying Coly's patch). So, the 'if' statement should be logical OR operator instead of logical AND operator. Thanks, Coly. ------------------------------------------------------ # lvm2-testsuite --only activate-minor .... [ 0:00] aux prepare_vg 2 [ 0:00] #activate-minor.sh:22+ aux prepare_vg 2 [ 0:00] ## preparing ramdisk device...ok (/dev/ram0) [ 0:01] 6,3160,167857640,-;brd: module loaded [ 0:01] ## preparing 2 devices...ok [ 0:01] 6,3161,167877024,-;dax_dev: 0000000000000000 [ 0:01] 6,3162,167877026,-;bdev_dax_supported(): 0 [ 0:01] 6,3163,167877041,-;dax_dev: 0000000000000000 [ 0:01] 6,3164,167877042,-;bdev_dax_supported(): 0 [ 0:01] 6,3165,167877160,-;dax_dev: 0000000000000000 [ 0:01] 6,3166,167877162,-;bdev_dax_supported(): 0 [ 0:01] 6,3167,167877407,-;dax_dev: 0000000000000000 [ 0:01] 6,3168,167877412,-;bdev_dax_supported(): 0 [ 0:01] 6,3169,167877430,-;dax_dev: 0000000000000000 [ 0:01] 6,3170,167877430,-;bdev_dax_supported(): 0 [ 0:01] 6,3171,167877572,-;dax_dev: 0000000000000000 [ 0:01] 6,3172,167877574,-;bdev_dax_supported(): 0 ....... [ 0:01] lvchange $vg/foo -a y [ 0:01] #activate-minor.sh:25+ lvchange LVMTEST12338vg/foo -a y [ 0:01] /tmp/LVMTEST12338.9M4A4QfLHQ/dev/mapper/LVMTEST12338vg-foo not set up by udev: Falling back to direct node creation. [ 0:01] 6,3173,168081520,-;dax_dev: 000000007f8e88a7 [ 0:01] 6,3174,168081524,-;bdev_dax_supported(): 0 [ 0:01] 6,3175,168081543,-;dax_dev: 000000007f8e88a7 [ 0:01] 6,3176,168081544,-;bdev_dax_supported(): 0 [ 0:01] 6,3177,168081749,-;dax_dev: 000000007f8e88a7 [ 0:01] 6,3178,168081750,-;bdev_dax_supported(): 0 ----------------------------------------------------- > Thanks. > > Coly Li > _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-03 11:09 ` Adrian Huang12 @ 2020-09-03 11:24 ` Coly Li 0 siblings, 0 replies; 15+ messages in thread From: Coly Li @ 2020-09-03 11:24 UTC (permalink / raw) To: Adrian Huang12, Mike Snitzer; +Cc: Jan Kara, Pankaj Gupta, linux-nvdimm On 2020/9/3 19:09, Adrian Huang12 wrote: > Hi Coly, > >> -----Original Message----- >> From: Coly Li <colyli@suse.de> >> Sent: Thursday, September 3, 2020 1:20 PM >> To: Mike Snitzer <snitzer@redhat.com> >> Cc: Jan Kara <jack@suse.com>; Ira Weiny <ira.weiny@intel.com>; Pankaj Gupta >> <pankaj.gupta.linux@gmail.com>; Vishal Verma <vishal.l.verma@intel.com>; >> linux-nvdimm@lists.01.org; Adrian Huang12 <ahuang12@lenovo.com> >> Subject: [External] Re: flood of "dm-X: error: dax access failed" due to 5.9 >> commit 231609785cbfb >> >> On 2020/9/3 00:51, Mike Snitzer wrote: >>> On Wed, Sep 02 2020 at 12:46pm -0400, >>> Coly Li <colyli@suse.de> wrote: >>> >>>> On 2020/9/3 00:44, Mike Snitzer wrote: >>>>> On Wed, Sep 02 2020 at 12:40pm -0400, Coly Li <colyli@suse.de> >>>>> wrote: >>>>> >>>>>> On 2020/9/3 00:04, Mike Snitzer wrote: >>>>>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() >>>>>>> in >>>>>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>>>>>> >>>>>>> The justification in the commit header is really inadequate. If >>>>>>> there is a problem that you need to drill in on, repeat the >>>>>>> testing after enabling the dynamic debugging. >>>>>>> >>>>>>> Otherwise, now all DM devices that aren't layered on DAX capable >>>>>>> devices spew really confusing noise to users when they simply >>>>>>> activate their non-DAX DM devices: >>>>>>> >>>>>>> [66567.129798] dm-6: error: dax access failed (-5) [66567.134400] >>>>>>> dm-6: error: dax access failed (-5) [66567.139152] dm-6: error: >>>>>>> dax access failed (-5) [66567.314546] dm-2: error: dax access >>>>>>> failed (-95) [66567.319380] dm-2: error: dax access failed (-95) >>>>>>> [66567.324254] dm-2: error: dax access failed (-95) [66567.479025] >>>>>>> dm-2: error: dax access failed (-95) [66567.483713] dm-2: error: >>>>>>> dax access failed (-95) [66567.488722] dm-2: error: dax access >>>>>>> failed (-95) [66567.494061] dm-2: error: dax access failed (-95) >>>>>>> [66567.498823] dm-2: error: dax access failed (-95) [66567.503693] >>>>>>> dm-2: error: dax access failed (-95) >>>>>>> >>>>>>> commit 231609785cbfb must be reverted. >>>>>>> >>>>>>> Please advise, thanks. >>>>>> >>>>>> Adrian Huang from Lenovo posted a patch, which titled: dax: do not >>>>>> print error message for non-persistent memory block device >>>>>> >>>>>> It fixes the issue, but no response for now. Maybe we should take this fix. >>>>> >>>>> OK, yes sounds like it. It was merged and is commit c2affe920b0e066 >>>>> ("dax: do not print error message for non-persistent memory block >>>>> device") >>>> >>>> Thanks for informing me this patch is merged, I am going to update my >>>> local one :-) >>> >>> So the thing is I'm running v5.9-rc3 (which includes this commit) but >>> I'm still seeing all these warnings when I run the lvm2 testsuite. >>> The reason _seems_ to be because the lvm2 testsuite uses brd devices >>> for test devices. So there is something about the brd device that >>> shows commit c2affe920b0e066 isn't enough :( >> >> [Resend and CC Adrian Huang] >> >> Hi Mike, >> >> Could you please apply and test this attached patch based on v5.9-rc3 ? >> >> It seems the pointer dax_dev of __generic_fsdax_supported() parameter is not >> initialized (IMHO this is not a dm bug), therefore the && should be >> || to check the dax support state. >> >> Also I add two pr_info() to print the variables value, let's see whether my guess >> makes sense. > > I confirmed that Mike's symptom can be easily reproduced with brd devices after running the tool 'lvm2-testsuite'. > > And, Coly's right. The dax_dev pointer is *NOT* NULL when the tool executes the command ' lvchange $vg/foo -a y'. Please see the following log (with applying Coly's patch). > > So, the 'if' statement should be logical OR operator instead of logical AND operator. Thanks, Coly. > > ------------------------------------------------------ > # lvm2-testsuite --only activate-minor > .... > [ 0:00] aux prepare_vg 2 > [ 0:00] #activate-minor.sh:22+ aux prepare_vg 2 > [ 0:00] ## preparing ramdisk device...ok (/dev/ram0) > [ 0:01] 6,3160,167857640,-;brd: module loaded > [ 0:01] ## preparing 2 devices...ok > [ 0:01] 6,3161,167877024,-;dax_dev: 0000000000000000 > [ 0:01] 6,3162,167877026,-;bdev_dax_supported(): 0 > [ 0:01] 6,3163,167877041,-;dax_dev: 0000000000000000 > [ 0:01] 6,3164,167877042,-;bdev_dax_supported(): 0 > [ 0:01] 6,3165,167877160,-;dax_dev: 0000000000000000 > [ 0:01] 6,3166,167877162,-;bdev_dax_supported(): 0 > [ 0:01] 6,3167,167877407,-;dax_dev: 0000000000000000 > [ 0:01] 6,3168,167877412,-;bdev_dax_supported(): 0 > [ 0:01] 6,3169,167877430,-;dax_dev: 0000000000000000 > [ 0:01] 6,3170,167877430,-;bdev_dax_supported(): 0 > [ 0:01] 6,3171,167877572,-;dax_dev: 0000000000000000 > [ 0:01] 6,3172,167877574,-;bdev_dax_supported(): 0 > ....... > [ 0:01] lvchange $vg/foo -a y > [ 0:01] #activate-minor.sh:25+ lvchange LVMTEST12338vg/foo -a y > [ 0:01] /tmp/LVMTEST12338.9M4A4QfLHQ/dev/mapper/LVMTEST12338vg-foo not set up by udev: Falling back to direct node creation. > [ 0:01] 6,3173,168081520,-;dax_dev: 000000007f8e88a7 > [ 0:01] 6,3174,168081524,-;bdev_dax_supported(): 0 > [ 0:01] 6,3175,168081543,-;dax_dev: 000000007f8e88a7 > [ 0:01] 6,3176,168081544,-;bdev_dax_supported(): 0 > [ 0:01] 6,3177,168081749,-;dax_dev: 000000007f8e88a7 > [ 0:01] 6,3178,168081750,-;bdev_dax_supported(): 0 > ----------------------------------------------------- Hi Adrian, Thanks for double check. I will post the fixes for you and Mike to review. Coly Li _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 16:40 ` Coly Li 2020-09-02 16:44 ` Mike Snitzer @ 2020-09-02 23:05 ` Verma, Vishal L 2020-09-03 3:32 ` Coly Li 1 sibling, 1 reply; 15+ messages in thread From: Verma, Vishal L @ 2020-09-02 23:05 UTC (permalink / raw) To: pankaj.gupta.linux, snitzer, colyli, jack, Weiny, Ira Cc: dm-devel, linux-nvdimm On Thu, 2020-09-03 at 00:40 +0800, Coly Li wrote: > On 2020/9/3 00:04, Mike Snitzer wrote: > > 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in > > __generic_fsdax_supported()") switched from pr_debug() to pr_info(). > > > > The justification in the commit header is really inadequate. If there > > is a problem that you need to drill in on, repeat the testing after > > enabling the dynamic debugging. > > > > Otherwise, now all DM devices that aren't layered on DAX capable devices > > spew really confusing noise to users when they simply activate their > > non-DAX DM devices: > > > > [66567.129798] dm-6: error: dax access failed (-5) > > [66567.134400] dm-6: error: dax access failed (-5) > > [66567.139152] dm-6: error: dax access failed (-5) > > [66567.314546] dm-2: error: dax access failed (-95) > > [66567.319380] dm-2: error: dax access failed (-95) > > [66567.324254] dm-2: error: dax access failed (-95) > > [66567.479025] dm-2: error: dax access failed (-95) > > [66567.483713] dm-2: error: dax access failed (-95) > > [66567.488722] dm-2: error: dax access failed (-95) > > [66567.494061] dm-2: error: dax access failed (-95) > > [66567.498823] dm-2: error: dax access failed (-95) > > [66567.503693] dm-2: error: dax access failed (-95) > > > > commit 231609785cbfb must be reverted. > > > > Please advise, thanks. > > Adrian Huang from Lenovo posted a patch, which titled: dax: do not print > error message for non-persistent memory block device > > It fixes the issue, but no response for now. Maybe we should take this fix. > Mike, Coly, I applied Adrians patch, and submitted it - it is already in v5.9-rc3 - c2affe920b0e dax: do not print error message for non-persistent memory block device _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb 2020-09-02 23:05 ` Verma, Vishal L @ 2020-09-03 3:32 ` Coly Li 0 siblings, 0 replies; 15+ messages in thread From: Coly Li @ 2020-09-03 3:32 UTC (permalink / raw) To: Verma, Vishal L; +Cc: pankaj.gupta.linux, snitzer, jack, dm-devel, linux-nvdimm On 2020/9/3 07:05, Verma, Vishal L wrote: > On Thu, 2020-09-03 at 00:40 +0800, Coly Li wrote: >> On 2020/9/3 00:04, Mike Snitzer wrote: >>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in >>> __generic_fsdax_supported()") switched from pr_debug() to pr_info(). >>> >>> The justification in the commit header is really inadequate. If there >>> is a problem that you need to drill in on, repeat the testing after >>> enabling the dynamic debugging. >>> >>> Otherwise, now all DM devices that aren't layered on DAX capable devices >>> spew really confusing noise to users when they simply activate their >>> non-DAX DM devices: >>> >>> [66567.129798] dm-6: error: dax access failed (-5) >>> [66567.134400] dm-6: error: dax access failed (-5) >>> [66567.139152] dm-6: error: dax access failed (-5) >>> [66567.314546] dm-2: error: dax access failed (-95) >>> [66567.319380] dm-2: error: dax access failed (-95) >>> [66567.324254] dm-2: error: dax access failed (-95) >>> [66567.479025] dm-2: error: dax access failed (-95) >>> [66567.483713] dm-2: error: dax access failed (-95) >>> [66567.488722] dm-2: error: dax access failed (-95) >>> [66567.494061] dm-2: error: dax access failed (-95) >>> [66567.498823] dm-2: error: dax access failed (-95) >>> [66567.503693] dm-2: error: dax access failed (-95) >>> >>> commit 231609785cbfb must be reverted. >>> >>> Please advise, thanks. >> >> Adrian Huang from Lenovo posted a patch, which titled: dax: do not print >> error message for non-persistent memory block device >> >> It fixes the issue, but no response for now. Maybe we should take this fix. >> > > Mike, Coly, > > I applied Adrians patch, and submitted it - it is already in v5.9-rc3 - > c2affe920b0e dax: do not print error message for non-persistent memory block device > Hi Verma, Thank you for taking it into mainline :-) Coly Li _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-09-03 11:31 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-02 16:04 flood of "dm-X: error: dax access failed" due to 5.9 commit 231609785cbfb Mike Snitzer 2020-09-02 16:40 ` Coly Li 2020-09-02 16:44 ` Mike Snitzer 2020-09-02 16:46 ` Coly Li 2020-09-02 16:51 ` Mike Snitzer 2020-09-02 16:53 ` Coly Li 2020-09-03 5:05 ` Coly Li 2020-09-03 5:20 ` Coly Li 2020-09-03 8:37 ` Coly Li 2020-09-03 11:24 ` [External] " Adrian Huang12 2020-09-03 11:31 ` Coly Li 2020-09-03 11:09 ` Adrian Huang12 2020-09-03 11:24 ` Coly Li 2020-09-02 23:05 ` Verma, Vishal L 2020-09-03 3:32 ` Coly Li
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).