[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1892d70bda0967284c1e94370a03c7c67e00533d.camel@intel.com>
Date: Fri, 8 Dec 2023 21:25:56 +0000
From: "Verma, Vishal L" <vishal.l.verma@...el.com>
To: "Huang, Ying" <ying.huang@...el.com>
CC: "david@...hat.com" <david@...hat.com>,
"Jiang, Dave" <dave.jiang@...el.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"linux-cxl@...r.kernel.org" <linux-cxl@...r.kernel.org>,
"Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"nvdimm@...ts.linux.dev" <nvdimm@...ts.linux.dev>
Subject: Re: [PATCH v2 2/2] dax: add a sysfs knob to control memmap_on_memory
behavior
On Fri, 2023-12-08 at 11:13 +0800, Huang, Ying wrote:
> Vishal Verma <vishal.l.verma@...el.com> writes:
>
[..]
> >
> > +
> > +static ssize_t memmap_on_memory_store(struct device *dev,
> > + struct device_attribute *attr,
> > + const char *buf, size_t len)
> > +{
> > + struct dev_dax *dev_dax = to_dev_dax(dev);
> > + struct dax_region *dax_region = dev_dax->region;
> > + ssize_t rc;
> > + bool val;
> > +
> > + rc = kstrtobool(buf, &val);
> > + if (rc)
> > + return rc;
> > +
> > + if (dev_dax->memmap_on_memory == val)
> > + return len;
> > +
> > + device_lock(dax_region->dev);
> > + if (!dax_region->dev->driver) {
>
> This still doesn't look right. Can we check whether the current driver
> is kmem? And only allow change if it's not kmem?
Ah yes I lost track of this todo between revisions when I split this
out. Let me fix that for the next revision.
Powered by blists - more mailing lists