Re: [dm-devel] [PATCH v3 10/19] nvme: Move NVMe and Block PR types to an array

2022-10-31 Thread Mike Christie
On 10/27/22 10:18 AM, Keith Busch wrote: > On Wed, Oct 26, 2022 at 06:19:36PM -0500, Mike Christie wrote: >> For Reservation Report support we need to also convert from the NVMe spec >> PR type back to the block PR definition. This moves us to an array, so in >> the next patch we can add another

Re: [dm-devel] [PATCH v3 10/19] nvme: Move NVMe and Block PR types to an array

2022-10-31 Thread Keith Busch
On Wed, Oct 26, 2022 at 06:19:36PM -0500, Mike Christie wrote: > For Reservation Report support we need to also convert from the NVMe spec > PR type back to the block PR definition. This moves us to an array, so in > the next patch we can add another helper to do the conversion without > having to

Re: [dm-devel] [PATCH v3 10/19] nvme: Move NVMe and Block PR types to an array

2022-10-31 Thread Mike Christie
On 10/27/22 12:16 PM, Keith Busch wrote: > On Thu, Oct 27, 2022 at 12:13:06PM -0500, michael.chris...@oracle.com wrote: >> Oh wait there was also a >> >> 3. The pr_types come from userspace so if it passes us 10 >> and we just do: >> >> types[pr_type] >> >> then we would crash due an out of bounds

Re: [dm-devel] [PATCH v3 10/19] nvme: Move NVMe and Block PR types to an array

2022-10-31 Thread Keith Busch
On Thu, Oct 27, 2022 at 12:13:06PM -0500, michael.chris...@oracle.com wrote: > Oh wait there was also a > > 3. The pr_types come from userspace so if it passes us 10 > and we just do: > > types[pr_type] > > then we would crash due an out of bounds error. > > Similarly I thought there could be

Re: [dm-devel] [PATCH v3 10/19] nvme: Move NVMe and Block PR types to an array

2022-10-31 Thread michael . christie
On 10/27/22 12:06 PM, Mike Christie wrote: > On 10/27/22 10:18 AM, Keith Busch wrote: >> On Wed, Oct 26, 2022 at 06:19:36PM -0500, Mike Christie wrote: >>> For Reservation Report support we need to also convert from the NVMe spec >>> PR type back to the block PR definition. This moves us to an

[dm-devel] [PATCH v3 10/19] nvme: Move NVMe and Block PR types to an array

2022-10-31 Thread Mike Christie
For Reservation Report support we need to also convert from the NVMe spec PR type back to the block PR definition. This moves us to an array, so in the next patch we can add another helper to do the conversion without having to manage 2 switches. Signed-off-by: Mike Christie ---