Re: [PATCH 3/3] target: Return descriptor format sense data

Christoph Hellwig
2015-07-14T14:40:32Z

On Tue, Jul 14, 2015 at 02:59:51PM +0300, Sagi Grimberg wrote:
> diff --git a/include/target/target_core_backend.h
> b/include/target/target_core_backend.h
> index 1e5c8f9..6ce370f 100644
> --- a/include/target/target_core_backend.h
> +++ b/include/target/target_core_backend.h
> @@ -3,6 +3,9 @@
>
> #define TRANSPORT_FLAG_PASSTHROUGH 1
>
> +#define TARGET_SENSE_DESC_FORMAT(dev) \
> + dev->transport->get_blocks(dev) >= 0xffffffffULL

Make this a proper function, given that MODE SENSE isn't in the fast
path it doesn't even have to be inline.

Together with a fix for the comment from Bart this looks good to me.