Re: dm snapshot: don't define direct_access if we don't support it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 27 2019 at 12:02pm -0500,
Mikulas Patocka <mpatocka@xxxxxxxxxx> 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@xxxxxxxxxx>
> 
> ---
>  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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux