Re: [PATCH v2] nvmet: fix nvmet_execute_write_zeroes function

2018-04-02 Thread Rodrigo Rosatti Galvao
I'm terribly sorry, but the +1 actually needs to be outside the le16_to_cpu. The above will work on little-endian machines, but not big. No problem at all. Thank you for helping on this. I'm going to send a V3 with this change. -- Rodrigo R. Galvão Intern - Linux Technology Center - IBM

Re: [PATCH v2] nvmet: fix nvmet_execute_write_zeroes function

2018-04-02 Thread Rodrigo Rosatti Galvao
I'm terribly sorry, but the +1 actually needs to be outside the le16_to_cpu. The above will work on little-endian machines, but not big. No problem at all. Thank you for helping on this. I'm going to send a V3 with this change. -- Rodrigo R. Galvão Intern - Linux Technology Center - IBM

Re: [PATCH v2] nvmet: fix nvmet_execute_write_zeroes function

2018-04-02 Thread Keith Busch
On Mon, Apr 02, 2018 at 11:49:41AM -0300, Rodrigo R. Galvao wrote: > When trying to issue write_zeroes command against TARGET with a 4K block > size, it ends up hitting the following condition at __blkdev_issue_zeroout: > > if ((sector | nr_sects) & bs_mask) > return -EINVAL;

Re: [PATCH v2] nvmet: fix nvmet_execute_write_zeroes function

2018-04-02 Thread Keith Busch
On Mon, Apr 02, 2018 at 11:49:41AM -0300, Rodrigo R. Galvao wrote: > When trying to issue write_zeroes command against TARGET with a 4K block > size, it ends up hitting the following condition at __blkdev_issue_zeroout: > > if ((sector | nr_sects) & bs_mask) > return -EINVAL;

[PATCH v2] nvmet: fix nvmet_execute_write_zeroes function

2018-04-02 Thread Rodrigo R. Galvao
When trying to issue write_zeroes command against TARGET with a 4K block size, it ends up hitting the following condition at __blkdev_issue_zeroout: if ((sector | nr_sects) & bs_mask) return -EINVAL; Causing the command to always fail. Considering we need to add 1 to get the

[PATCH v2] nvmet: fix nvmet_execute_write_zeroes function

2018-04-02 Thread Rodrigo R. Galvao
When trying to issue write_zeroes command against TARGET with a 4K block size, it ends up hitting the following condition at __blkdev_issue_zeroout: if ((sector | nr_sects) & bs_mask) return -EINVAL; Causing the command to always fail. Considering we need to add 1 to get the