[PATCH v4] block: Check partition alignment on zoned block devices

2016-11-30 Thread Damien Le Moal
Both blkdev_report_zones and blkdev_reset_zones can operate on a partition of a zoned block device. However, the first and last zones reported for a partition make sense only if the partition start sector and size are aligned on the device zone size. The same applies for zone reset. Resetting the

Re: [PATCH v3] block: Check partition alignment on zoned block devices

2016-11-30 Thread Hannes Reinecke
On 12/01/2016 07:25 AM, Damien Le Moal wrote: > Both blkdev_report_zones and blkdev_reset_zones can operate on a partition of > a zoned block device. However, the first and last zones reported for a > partition make sense only if the partition start sector and size are aligned > on the device zone

[PATCH v3] block: Check partition alignment on zoned block devices

2016-11-30 Thread Damien Le Moal
Both blkdev_report_zones and blkdev_reset_zones can operate on a partition of a zoned block device. However, the first and last zones reported for a partition make sense only if the partition start sector and size are aligned on the device zone size. The same applies for zone reset. Resetting the

Re: [PATCH v2] block: Check partition alignment on zoned block devices

2016-11-30 Thread Jens Axboe
> On Nov 30, 2016, at 8:42 PM, Damien Le Moal wrote: > > > Jens, > > On 12/1/16 12:03, Jens Axboe wrote: >>> Martin, Shaun and myself agreed on the restriction. All ZBC/ZAC disks on >>> the market today match these so there are no problems. And it is >>> unlikely that

Re: [PATCH v2] block: Check partition alignment on zoned block devices

2016-11-30 Thread Damien Le Moal
Jens, On 12/1/16 12:03, Jens Axboe wrote: >> Martin, Shaun and myself agreed on the restriction. All ZBC/ZAC disks on >> the market today match these so there are no problems. And it is >> unlikely that we will ever see weirdly sized SMR drives (customers >> generally do not want that). > > I'm

Re: [PATCHv5 22/36] mm, hugetlb: switch hugetlbfs to multi-order radix-tree entries

2016-11-30 Thread Hillf Danton
On Wednesday, November 30, 2016 9:16 PM Kirill A. Shutemov wrote: > On Wed, Nov 30, 2016 at 05:48:05PM +0800, Hillf Danton wrote: > > On Tuesday, November 29, 2016 7:23 PM Kirill A. Shutemov wrote: > > > @@ -607,10 +605,10 @@ static long hugetlbfs_fallocate(struct file *file, > > > int mode,

Re: [PATCH v2] block: Check partition alignment on zoned block devices

2016-11-30 Thread Damien Le Moal
Jens, On 12/1/16 10:40, Jens Axboe wrote: > This looks better, thanks. Are the zone sizes mandated by spec to be a > power-of-2? No, the standards allow any zone size, and different sizes for the zones too. However, the sd_zbc code down in the SCSI stack limits support to HM & HA drives that

Re: [PATCH v2] block: Check partition alignment on zoned block devices

2016-11-30 Thread Jens Axboe
On 11/30/2016 05:22 PM, Damien Le Moal wrote: > Both blkdev_report_zones and blkdev_reset_zones can operate on a partition of > a zoned block device. However, the first and last zones reported for a > partition make sense only if the partition start sector and size are aligned > on the device zone

Re: [PATCH v2 2/4] block: Add Sed-opal library

2016-11-30 Thread Keith Busch
On Tue, Nov 29, 2016 at 02:52:00PM -0700, Scott Bauer wrote: > +struct opal_dev { > + dev_t majmin; > + sed_sec_submit *submit_fn; > + void *submit_data; > + struct opal_lock_unlock lkul; > + const opal_step *funcs; > + void **func_data; > + bool resume_from_suspend; >

Re: [PATCH v2 3/4] nvme: Implement resume_from_suspend and sed block ioctl

2016-11-30 Thread Keith Busch
On Tue, Nov 29, 2016 at 02:52:01PM -0700, Scott Bauer wrote: > +static int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, > +size_t len, bool send) > +{ > + struct request_queue *q; > + struct request *req; > + struct nvme_ns *ns; > + struct

[PATCH v2] block: Check partition alignment on zoned block devices

2016-11-30 Thread Damien Le Moal
Both blkdev_report_zones and blkdev_reset_zones can operate on a partition of a zoned block device. However, the first and last zones reported for a partition make sense only if the partition start sector and size are aligned on the device zone size. The same applies for zone reset. Resetting the

[PATCH V2 4/5] nvme: add support for the Write Zeroes command

2016-11-30 Thread Chaitanya Kulkarni
Allow write zeroes operations (REQ_OP_WRITE_ZEROES) on the block device, if the device supports optional command bit set for write zeroes. Add support to setup write zeroes command. Set maximum possible write zeroes sectors in one write zeroes command according to nvme write zeroes command

[PATCH V2 3/5] nvme.h: add Write Zeroes definitions

2016-11-30 Thread Chaitanya Kulkarni
Add the command structure, optional command set support (ONCS) bit and a new error code for the Write Zeroes command. Signed-off-by: Chaitanya Kulkarni --- include/linux/nvme.h | 20 1 file changed, 20 insertions(+) diff --git

[PATCH V2 5/5] nvmet: add support for the Write Zeroes command

2016-11-30 Thread Chaitanya Kulkarni
Add support for handling write zeroes command on target. Call into __blkdev_issue_zeroout, which the block layer expands into the best suitable variant of zeroing the LBAs. Allow write zeroes operation to deallocate the LBAs when calling __blkdev_issue_zeroout. Signed-off-by: Chaitanya Kulkarni

Re: [PATCH v2 2/4] block: Add Sed-opal library

2016-11-30 Thread Scott Bauer
es1;4205;0cOn Wed, Nov 30, 2016 at 01:13:57PM -0500, Keith Busch wrote: > On Tue, Nov 29, 2016 at 02:52:00PM -0700, Scott Bauer wrote: > > + dev = get_or_create_opal_dev(bdev, key->opal_act.key.lr, true); > > + if (!dev) > > + return -ENOMEM; > > The alloc_opal_dev from this call

Re: [PATCHv5 22/36] mm, hugetlb: switch hugetlbfs to multi-order radix-tree entries

2016-11-30 Thread Kirill A. Shutemov
On Wed, Nov 30, 2016 at 05:48:05PM +0800, Hillf Danton wrote: > On Tuesday, November 29, 2016 7:23 PM Kirill A. Shutemov wrote: > > @@ -607,10 +605,10 @@ static long hugetlbfs_fallocate(struct file *file, > > int mode, loff_t offset, > > } > > > > /* Set numa allocation