lkml.org 
[lkml]   [2019]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v5 3/6] libnvdimm: add dax_dev sync flag
    On Tue, Apr 9, 2019 at 9:10 PM Pankaj Gupta <pagupta@redhat.com> wrote:
    >
    > This patch adds 'DAXDEV_SYNC' flag which is set
    > for nd_region doing synchronous flush. This later
    > is used to disable MAP_SYNC functionality for
    > ext4 & xfs filesystem for devices don't support
    > synchronous flush.
    >
    > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
    > ---
    > drivers/dax/bus.c | 2 +-
    > drivers/dax/super.c | 13 ++++++++++++-
    > drivers/md/dm.c | 2 +-
    > drivers/nvdimm/pmem.c | 3 ++-
    > drivers/nvdimm/region_devs.c | 7 +++++++
    > include/linux/dax.h | 9 +++++++--
    > include/linux/libnvdimm.h | 1 +
    > 7 files changed, 31 insertions(+), 6 deletions(-)
    >
    > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
    > index 2109cfe80219..431bf7d2a7f9 100644
    > --- a/drivers/dax/bus.c
    > +++ b/drivers/dax/bus.c
    > @@ -388,7 +388,7 @@ struct dev_dax *__devm_create_dev_dax(struct dax_region *dax_region, int id,
    > * No 'host' or dax_operations since there is no access to this
    > * device outside of mmap of the resulting character device.
    > */
    > - dax_dev = alloc_dax(dev_dax, NULL, NULL);
    > + dax_dev = alloc_dax(dev_dax, NULL, NULL, true);

    I find apis that take a boolean as unreadable. What does 'true' mean?
    It wastes time to go look at the function definition vs something
    like:

    alloc_dax(dev_dax, NULL, NULL, DAXDEV_F_SYNC);

    \
     
     \ /
      Last update: 2019-04-11 16:57    [W:6.021 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site