From: Mike Snitzer <snitzer@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: dm-devel@redhat.com
Subject: Re: dm snapshot: don't define direct_access if we don't support it
Date: Wed, 27 Feb 2019 12:27:48 -0500 [thread overview]
Message-ID: <20190227172748.GB16467@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1902271201430.9163@file01.intranet.prod.int.rdu2.redhat.com>
On Wed, Feb 27 2019 at 12:02pm -0500,
Mikulas Patocka <mpatocka@redhat.com> wrote:
> Don't define a direct_access function that fails, dm_dax_direct_access
> already fails with -EIO if the pointer is zero;
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
>
> ---
> drivers/md/dm-snap.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> Index: linux-2.6/drivers/md/dm-snap.c
> ===================================================================
> --- linux-2.6.orig/drivers/md/dm-snap.c 2019-02-27 17:57:19.000000000 +0100
> +++ linux-2.6/drivers/md/dm-snap.c 2019-02-27 17:57:47.000000000 +0100
> @@ -2338,13 +2338,6 @@ static int origin_map(struct dm_target *
> return do_origin(o->dev, bio);
> }
>
> -static long origin_dax_direct_access(struct dm_target *ti, pgoff_t pgoff,
> - long nr_pages, void **kaddr, pfn_t *pfn)
> -{
> - DMWARN("device does not support dax.");
> - return -EIO;
> -}
> -
> /*
> * Set the target "max_io_len" field to the minimum of all the snapshots'
> * chunk sizes.
> @@ -2404,7 +2397,6 @@ static struct target_type origin_target
> .postsuspend = origin_postsuspend,
> .status = origin_status,
> .iterate_devices = origin_iterate_devices,
> - .direct_access = origin_dax_direct_access,
> };
>
> static struct target_type snapshot_target = {
Applied to dm-5.1 branch, thanks.
Mike
prev parent reply other threads:[~2019-02-27 17:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 17:02 [PATCH] dm snapshot: don't define direct_access if we don't support it Mikulas Patocka
2019-02-27 17:27 ` Mike Snitzer [this message]
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=20190227172748.GB16467@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
--cc=mpatocka@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox