All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Jan Kara <jack@suse.cz>, "colyli@suse.de" <colyli@suse.de>,
	Adrian Huang <ahuang12@lenovo.com>, Jan Kara <jack@suse.com>,
	Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Mikulas Patocka <mpatocka@redhat.com>
Subject: Re: 回复:regression caused by patch 6180bb446ab624b9ab8bf201ed251ca87f07b413?? ("dax: fix detection of dax support for non-persistent memory block?? devices")
Date: Tue, 15 Sep 2020 15:56:56 -0400	[thread overview]
Message-ID: <20200915195656.GA21635@redhat.com> (raw)
In-Reply-To: <CAPcyv4jHG7Lp0RrX+WmNHY5iSE5FjgrvYxd_d6TN5CKfc5LReQ@mail.gmail.com>

On Tue, Sep 15 2020 at  3:49pm -0400,
Dan Williams <dan.j.williams@intel.com> wrote:

> On Tue, Sep 15, 2020 at 1:01 AM Jan Kara <jack@suse.cz> wrote:
> >
> > Hi!
> >
> > On Tue 15-09-20 11:03:29, colyli@suse.de wrote:
> > > Could you please to take a look? I am offline in the next two weeks.
> >
> > I just had a look into this. IMHO the justification in 6180bb446a "dax: fix
> > detection of dax support for non-persistent memory block devices" is just
> > bogus and people got confused by the previous condition
> >
> > if (!dax_dev && !bdev_dax_supported(bdev, blocksize))
> >
> > which was bogus as well. bdev_dax_supported() always returns false for bdev
> > that doesn't have dax_dev (naturally so). So in the original condition
> > there was no point in calling bdev_dax_supported() if we know dax_dev is
> > NULL.
> >
> > Then this was changed to:
> >
> > if (!dax_dev || !bdev_dax_supported(bdev, blocksize))
> >
> > which looks more sensible at the first sight. But only at the first sight -
> > if you look at wider context, __generic_fsdax_supported() is the bulk of
> > code that decides whether a device supports DAX so calling
> > bdev_dax_supported() from it indeed doesn't look as such a great idea. So
> > IMO the condition should be just:
> >
> > if (!dax_dev)
> >
> > I'll send a fix for this.
> 
> If you beat me to it, great, but you might be sleeping now. I agree
> the original condition was bogus and looks to be a result of previous
> non-thorough refactoring on my part. I think we can move that !dax_dev
> into dax_supported(). I'll take a look.

You trimmed the relevant portion of Jan's reply but: can you also
weigh-in one whether DM is using the wrong function to test for DAX?

Mike
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

  reply	other threads:[~2020-09-15 19:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 15:48 regression caused by patch 6180bb446ab624b9ab8bf201ed251ca87f07b413 ("dax: fix detection of dax support for non-persistent memory block devices") Mikulas Patocka
2020-09-15  3:03 ` 回复:regression " colyli
2020-09-15  8:01   ` 回复:regression caused by patch 6180bb446ab624b9ab8bf201ed251ca87f07b413?? ("dax: fix detection of dax support for non-persistent memory block?? devices") Jan Kara
2020-09-15 15:12     ` Verma, Vishal L
2020-09-16  9:17       ` Jan Kara
2020-09-15 19:49     ` Dan Williams
2020-09-15 19:56       ` Mike Snitzer [this message]
2020-09-15 20:11         ` Dan Williams
2020-09-16 11:24       ` Jan Kara
2020-09-15  8:03 ` [External] regression caused by patch 6180bb446ab624b9ab8bf201ed251ca87f07b413 ("dax: fix detection of dax support for non-persistent memory block devices") Adrian Huang12
2020-09-15  8:16   ` Adrian Huang12
2020-09-15 11:09   ` Mikulas Patocka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200915195656.GA21635@redhat.com \
    --to=snitzer@redhat.com \
    --cc=ahuang12@lenovo.com \
    --cc=colyli@suse.de \
    --cc=dan.j.williams@intel.com \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mpatocka@redhat.com \
    --cc=pankaj.gupta.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.