{
> + zone_blocks = 0;
> goto out;
> + }
>
> same = buf[4] & 0x0f;
> if (same > 0) {
> --
> 2.9.0
>
Reviewed-by: Shaun Tancheff
--
Shaun Tancheff
lock_device *bdev,
>
> }
>
> + *nr_zones = nz;
> out:
> bio_for_each_segment_all(bv, bio, i)
> __free_page(bv->bv_page);
> bio_put(bio);
>
> - if (ret == 0)
> - *nr_zones = nz;
> -
> r
On Thu, Oct 13, 2016 at 6:00 PM, Adam Manzanares
wrote:
> The request priority is now by default coming from the ioc. It was not
> clear what this code was trying to do based upon the iopriority class or
> data. The driver should check that a device supports priorities and use
> them according to
zone information result is passed as an array
of struct blk_zone identical to the structure used internally for
processing the REQ_OP_ZONE_REPORT operation. The BLKRESETZONE ioctl
maps to a single call of the blkdev_reset_zones function.
Signed-off-by: Shaun Tancheff
Signed-off-by: Damien Le
zones of the device.
Signed-off-by: Hannes Reinecke
[Damien: * Removed the zone cache
* Implement report zones operation based on earlier proposal
by Shaun Tancheff ]
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Reviewed-by
Shaun Tancheff
* Removed confusing use of 512B sector units in functions
interface]
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
Reviewed-by: Shaun Tancheff
Tested-by: Shaun Tancheff
---
Changes from v5:
* Rebased on Jens' for-4.9/block branch (v5 is bas
From: Shaun Tancheff
Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling zones of
host-managed and host-aware zoned block devices. With with these two
new operations, the total number of operations defined reaches 8 and
still fits with the 3 bits definition of REQ_OP_BITS.
Signed-off
From: Hannes Reinecke
Signed-off-by: Hannes Reinecke
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Reviewed-by: Shaun Tancheff
Tested-by: Shaun Tancheff
---
block/blk-settings.c | 4
1 file changed, 4 insertions(+)
diff --git a/block
: Martin K. Petersen
Reviewed-by: Shaun Tancheff
Tested-by: Shaun Tancheff
---
Documentation/ABI/testing/sysfs-block | 13 +
block/blk-sysfs.c | 11 +++
2 files changed, 24 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-block
b/Documentation/A
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
Reviewed-by: Martin K. Petersen
Reviewed-by: Shaun Tancheff
Tested-by: Shaun Tancheff
---
Documentation/ABI/testing/sysfs-block | 16
block/blk-settings.c | 1 +
block/blk-sysfs.c | 18
This series introduces support for zoned block devices. It integrates
earlier submissions by Hannes Reinecke, Damien Le Moal and Shaun Tancheff.
Compared to the previous series version, the code was significantly
simplified by limiting support to zoned devices satisfying the following
conditions
Confirmed:
- Removing DEBUG_VM_RB fixes the hang.
Also confirmed:
- Above patch fixes the hang when DEBUG_VM_RB is re-enabled.
Thanks!
On Tue, Sep 27, 2016 at 11:05 AM, Andrea Arcangeli wrote:
> Hello,
>
> On Tue, Sep 27, 2016 at 05:16:15AM -0500, Shaun Tancheff wrote:
>
is a solid hang after boot and switch to starting gnome session.
Hang at about 35s.
kdbg traceback is all null entries.
Let me know what additional information I can provide.
Regards,
Shaun Tancheff
fG3WVYGOrWzA&m=vJFB6pCywWtdvkgHz9Vc0jQz0xzeyZlr-7eCWYu88nM&s=yiQLPFpqmMrbqLZz1Jb3aNqOje2dRMLJHEzUDobwcXc&e=
--
Shaun Tancheff
On Thu, Aug 25, 2016 at 9:31 PM, Damien Le Moal wrote:
>
> Shaun,
>
> On 8/25/16 05:24, Shaun Tancheff wrote:
>>
>> (RESENDING to include f2fs, fs-devel and dm-devel)
>>
>> Add op flags to access to zone information as well as open, close
>> and reset zon
On Thu, Aug 25, 2016 at 2:01 AM, Tom Yan wrote:
> Really please just drop this patch. There is no rational reason for
> you to associate the maximum payload size to the logical sector size.
Been over this many, many times now. It has to do with the size of
the buffer setup through WRITE SAME in d
On Thu, Aug 25, 2016 at 1:23 AM, Tom Yan wrote:
> You only fill the bytes that you want to to set explicitly:
>
> + put_unaligned_le16(0x0002, &sctpg[0]); /* SCT_ACT_WRITE_SAME */
> + put_unaligned_le16(0x0101, &sctpg[1]); /* WRITE PTRN FG */
> + put_unaligned_le64(lba, &sc
On Thu, Aug 25, 2016 at 1:31 AM, Tom Yan wrote:
> On 25 August 2016 at 05:28, Shaun Tancheff wrote:
>> On Wed, Aug 24, 2016 at 12:31 AM, Tom Yan wrote:
>>> On 24 August 2016 at 11:33, Martin K. Petersen
>>> wrote:
>>>>>>>>> "To
On Wed, Aug 24, 2016 at 1:10 AM, Tom Yan wrote:
> Btw, I wonder if you need to memset your buffer with 0 first, like
> what is done in ata_scsi_rbuf_get.
It is not necessary as the defined buffer is completely filled out here.
Are you thinking as a sort of future proofing?
Ex: In the unlikely ev
mmand acted upon. Unlike reads
>> and writes there is not a 1:1 mapping between the transfer length and
>> the affected area. So we do a bit of magic after the buffer has been
>> mapped to ensure that the completion byte count matches the number of
>> blocks that were affected by the command rather than the size of the
>> data buffer in bytes.
>>
>> --
>> Martin K. Petersen Oracle Linux Engineering
--
Shaun Tancheff
these different cases ?
>
> Yes, so once I can retrieve the zone information from the device, surely I'll
> add that.
I have posted some patches that will allow you to retrieve the zone
information for both HA and HM drives.
Can you see if this would meet your needs?
The data is returned to the BIO is in the same (drive) format as SG_IO.
>> Also, I think that the DISCARD option must be enabled by default for
>> HMSMR disks. Otherwise, zones write pointer will never get reset.
>> The same applies to HASMR devices mounted with the LFS mode.
>> (In any case, the discard handling does not look like it will always
>> align to the device zone size, which will fail on a zoned disk (discard
>> granularity is the zone size). I may be missing something though. Still
>> checking.)
>
> Yup, will do. BTW, I remember I fixed zone-aligned discard issue before.
> Could you please check the latest dev-test branch in f2fs.git?
> I'm used to rebase that branch occasionally when I changed the previous
> patches.
I think you will need to have the have access to the zone information.
Regards,
Shaun Tancheff
(RESENDING to include f2fs, fs-devel and dm-devel)
Add support for ZBC ioctl's
BLKREPORT - Issue Report Zones to device.
BLKZONEACTION - Issue a Zone Action (Close, Finish, Open, or Reset)
Signed-off-by: Shaun Tancheff
---
v8:
- Changed ioctl for zone actions to a single ioctl
igned-off-by: Shaun Tancheff
---
v8:
- Added Finish Zone op
- Fixed report zones copy to user to work when HARDENED_USERCOPY is enabled
v6:
- Added GFP_DMA to gfp mask.
v5:
- In sd_setup_zone_action_cmnd, remove unused vars and fix switch indent
- In blk-lib fix documentation
v4:
- Rebase on
- Changed bi_rw to op_flags clarify sepeartion of bio op from flags.
- Fixed memory leak in blkdev_issue_zone_report failing to put_bio().
- Documented opt in blkdev_issue_zone_report.
- Moved include/uapi/linux/fs.h changes to patch 3
- Fixed commit message for first patch in series.
Shaun Tanch
accordingly.
The ACS-2 specification is quite clear that the DSM command payload is
sized as number of 512 byte transfers so a 4Kn device will operate
correctly without this patch.
Signed-off-by: Shaun Tancheff
---
v5:
- Reshuffled descripton.
- Added support for a sector_size descriptor other than 512
On Mon, Aug 22, 2016 at 8:25 PM, Damien Le Moal wrote:
>
> Shaun,
>
> On 8/23/16 09:22, Shaun Tancheff wrote:
>> On Mon, Aug 22, 2016 at 6:57 PM, Damien Le Moal
>> wrote:
>> Also you may note that in my patch to get Host Aware working
>> with the zone cac
On Tue, Aug 23, 2016 at 5:37 AM, Tom Yan wrote:
> On 22 August 2016 at 04:23, Shaun Tancheff wrote:
>> +/**
>> + * ata_format_dsm_trim_descr() - SATL Write Same to ATA SCT Write Same
>> + * @cmd: SCSI command being translated
>> + * @lba: Starting sector
>> + * @
On Tue, Aug 23, 2016 at 2:53 AM, Tom Yan wrote:
> On 23 August 2016 at 06:20, Shaun Tancheff wrote:
>> On Tue, Aug 23, 2016 at 12:26 AM, Tom Yan wrote:
>>
>>> It is always 1 merely because we prefer sticking to that. Say we want
>>> to enable multi-block p
gle logical sector.
> Also note that the payload is NOT always fully-filled.
Oh, I was considering filling the remainder of the buffer
with 0's using memset() as you described to be "filly-filled"
in this case. Sorry for the confusion.
--
Shaun Tancheff
an conclusion on that as well?)
I had thought the conclusion was leave b0 as is and let the WS10 limit
take effect per Martin.
--
Shaun Tancheff
orks
let it be.
> So I don't think it makes any sense to check ATA_SCSI_RBUF_SIZE
> against 512 here.
Again, not sure I agree, but I don't really care on that point. Just many
years of defensive coding.
> On 22 August 2016 at 22:00, Shaun Tancheff wrote:
>> Because this is
he SATL code being used to emulating SCSI Write Same which does
have a limited number of sectors .. so falling back to the SCSI limit
seems reasonable.
So the limit that is being applied is either the current TRIM limit,
or the SCSI Write Same limit.
--
Shaun Tancheff
On Mon, Aug 22, 2016 at 6:57 PM, Damien Le Moal wrote:
>
> Shaun,
>
> On 8/22/16 13:31, Shaun Tancheff wrote:
> [...]
>> -int sd_zbc_setup_discard(struct scsi_disk *sdkp, struct request *rq,
>> - sector_t sector, unsigned int num_sectors)
>>
On Mon, Aug 22, 2016 at 3:14 PM, Tom Yan wrote:
> On 23 August 2016 at 03:43, Shaun Tancheff wrote:
>>
>> Why would we enforce upper level limits on something that doesn't
>> have any?
>
> If we advertise a limit in our SATL, it makes sense that we should
> ma
On Mon, Aug 22, 2016 at 4:20 PM, Tom Yan wrote:
> On 22 August 2016 at 04:23, Shaun Tancheff wrote:
>> Safely overwriting the attached page to ATA format from the SCSI formatted
>> variant.
>>
>> Signed-off-by: Shaun Tancheff
>> ---
>> v6:
>> - Fix
On Mon, Aug 22, 2016 at 2:27 PM, Tom Yan wrote:
> On 22 August 2016 at 12:23, Shaun Tancheff wrote:
>> Safely overwriting the attached page to ATA format from the SCSI formatted
>> variant.
>>
>> Signed-off-by: Shaun Tancheff
>> ---
>> v6:
>> - Fix
On Mon, Aug 22, 2016 at 2:20 PM, Tom Yan wrote:
> On 22 August 2016 at 12:23, Shaun Tancheff wrote:
>> SATA drives may support write same via SCT. This is useful
>> for setting the drive contents to a specific pattern (0's).
>>
>> Translate a SCSI WRITE SAME 16
On Mon, Aug 22, 2016 at 12:02 PM, Tom Yan wrote:
> On 22 August 2016 at 15:04, Shaun Tancheff wrote:
>> On Mon, Aug 22, 2016 at 3:33 AM, Tom Yan wrote:
>>> On 22 August 2016 at 08:31, Tom Yan wrote:
> Since I have no experience with SCT Write Same at all, and neither do
On Mon, Aug 22, 2016 at 2:11 AM, Hannes Reinecke wrote:
> On 08/22/2016 06:34 AM, Shaun Tancheff wrote:
>> Currently the RB-Tree zone cache is fast and flexible. It does
>> use a rather largish amount of ram. This model reduces the ram
>> required from 120 bytes per zone to 1
ter than they can Write Same,
However the internal implementation is opaque so I can't
say if Write Same is often implemented in terms of TRIM
or not. I mean that's how _I_ do it [Write 1 block and map
N blocks to it], But not every FTL will have come to the
same conclusion.
I also suspect that given the choice for most use casess that
TRIM is preferred over WS when TRIM supports returning
zeroed blocks.
--
Shaun Tancheff
On Sun, Aug 21, 2016 at 11:34 PM, Shaun Tancheff wrote:
> Currently the RB-Tree zone cache is fast and flexible. It does
> use a rather largish amount of ram. This model reduces the ram
> required from 120 bytes per zone to 16 bytes per zone with a
> moderate transformation of the blk
.
Signed-off-by: Shaun Tancheff
---
block/blk-core.c |2 +-
block/blk-sysfs.c | 31 +-
block/blk-zoned.c | 103 +++--
drivers/scsi/sd.c |5 +-
drivers/scsi/sd.h |4 +-
drivers/scsi/sd_zbc.c | 1025 +++-
include
Move the remaining ZBC specific code to sd_zbc.c
Signed-off-by: Shaun Tancheff
---
drivers/scsi/sd.c | 65 +--
drivers/scsi/sd.h | 20 ++
drivers/scsi/sd_zbc.c | 170 +++---
3 files changed, 126 insertions(+), 129
.
Shaun Tancheff (2):
Move ZBC core setup to sd_zbc
Migrate zone cache from RB-Tree to arrays of descriptors
block/blk-core.c |2 +-
block/blk-sysfs.c | 31 +-
block/blk-zoned.c | 103 +++--
drivers/scsi/sd.c | 66 +--
drivers/scsi/sd.h | 20 +-
drivers
Finish zones having no other analog are sent directly
to the device.
On successful completion each zone action will update the zone cache
as appropriate.
Signed-off-by: Shaun Tancheff
---
block/blk-lib.c | 16 --
drivers/scsi/sd.c | 42 +++-
drivers/scsi/sd.h | 22 +-
drivers
when the WP indicates that 2000 blocks
in the zone are in use and the discard indicated 1000 blocks
can be unmapped the discard should fail as a Reset WP will
unmap all the 2000 blocks in the zone.
Signed-off-by: Shaun Tancheff
---
drivers/scsi/sd.c | 45 ++---
drivers/scsi/sd.h
Dedupe ZBC/ZAC constants used for reporting options, same code,
zone condition and zone type.
These are all useful to programs consuming zone information from
user space as well so include them in a uapi header.
Signed-off-by: Shaun Tancheff
---
block/blk-lib.c | 4
heff/linux/tree/v4.8-rc2%2Bbiof.v9
g...@github.com:stancheff/linux.git v4.8-rc2+biof.v9
v2:
- Fully integrated bio <-> zone cache [<-> device]
- Added discard -> write same for conventional zones.
- Merged disparate constants into a canonical set.
Shaun Tancheff (4):
E
Seagate drives report a SAME code of 0 due to having:
- Zones of different types (CMR zones at the low LBA space).
- Zones of different size (A terminating 'runt' zone in the high
lba space).
Support loading the zone topology into the zone cache.
Signed-off-by: Shau
Use non DMA write log when ATA_DFLAG_PIO is set.
Signed-off-by: Shaun Tancheff
---
v6: Added check for ATA_DFLAG_PIO and fallback to non DMA write log for
SCT Write Same
drivers/ata/libata-scsi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata
Correct handling of devices with sector_size other that 512 bytes.
Signed-off-by: Shaun Tancheff
---
In the case of a 4Kn device sector_size it is possible to describe a much
larger DSM Trim than the current fixed default of 512 bytes.
This patch assumes the minimum descriptor is sector_size
t set translate to SCT Write Same
Signed-off-by: Shaun Tancheff
---
v6:
- Change to use sg_copy_from_buffer as per Christoph Hellwig
v5:
- Addressed review comments
- Report support for ZBC only for zoned devices.
- kmap page during rewrite
- Fix unmap set to require trim or error, if not
fugly ata hacking from sd.c
Shaun Tancheff (4):
libata: Safely overwrite attached page in WRITE SAME xlat
Add support for SCT Write Same
SCT Write Same / DSM Trim
SCT Write Same handle ATA_DFLAG_PIO
drivers/ata/libata-scsi.c | 280 +-
include
Safely overwriting the attached page to ATA format from the SCSI formatted
variant.
Signed-off-by: Shaun Tancheff
---
v6:
- Fix bisect bug reported by Tom Yan
- Change to use sg_copy_from_buffer as per Christoph Hellwig
v5:
- Added prep patch to work with non-page aligned scatterlist pages
Add support for ZBC ioctl's
BLKREPORT - Issue Report Zones to device.
BLKZONEACTION - Issue a Zone Action (Close, Finish, Open, or Reset)
Signed-off-by: Shaun Tancheff
---
v8:
- Changed ioctl for zone actions to a single ioctl that takes
a structure including the zone,
eport zones currently defaults to reporting on all zones. It expected
that support for the zone option flag will piggy back on streamid
support. The report option flag is useful as it can reduce the number
of zones in each report, but not critical.
Signed-off-by: Shaun Tancheff
---
v8:
- Added Finish
op from flags.
- Fixed memory leak in blkdev_issue_zone_report failing to put_bio().
- Documented opt in blkdev_issue_zone_report.
- Moved include/uapi/linux/fs.h changes to patch 3
- Fixed commit message for first patch in series.
Shaun Tancheff (2):
Add bio/request flags to issue ZBC/ZAC co
On Tue, Aug 9, 2016 at 11:38 PM, Damien Le Moal wrote:
> Shaun,
>
> On 8/10/16 12:58, Shaun Tancheff wrote:
>>
>> On Tue, Aug 9, 2016 at 3:09 AM, Damien Le Moal
>> wrote:
>>>>
>>>> On Aug 9, 2016, at 15:47, Hannes Reinecke wrote:
>>
>&
On Mon, Aug 15, 2016 at 11:00 PM, Damien Le Moal wrote:
>
> Shaun,
>
>> On Aug 14, 2016, at 09:09, Shaun Tancheff wrote:
> […]
>>>>
>>> No, surely not.
>>> But one of the _big_ advantages for the RB tree is blkdev_discard().
>>> Withou
);
>
> return min(blk_max_size_offset(q, offset),
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index 7598e6ca817a..dbafc5df03f3 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -223,7 +223,7 @@ static void __blk_add_trace(struct blk_trace *bt,
> sector_t sector, int bytes,
> what |= MASK_TC_BIT(op_flags, META);
> what |= MASK_TC_BIT(op_flags, PREFLUSH);
> what |= MASK_TC_BIT(op_flags, FUA);
> - if (op == REQ_OP_DISCARD)
> + if (op == REQ_OP_DISCARD || op == REQ_OP_SECURE_ERASE)
> what |= BLK_TC_ACT(BLK_TC_DISCARD);
> if (op == REQ_OP_FLUSH)
> what |= BLK_TC_ACT(BLK_TC_FLUSH);
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-block" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at
> https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DQIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=Y15JQ82w_sRbTpLbwWZih05XQoGHNqYfhx0M_42AepQ&s=LMrzTEwBuBaQO9U9V-bZnGTGnpBfUXCdpjig4yyXvDM&e=
--
Shaun Tancheff
On Tue, Aug 9, 2016 at 1:47 AM, Hannes Reinecke wrote:
> On 08/05/2016 10:35 PM, Shaun Tancheff wrote:
>> On Tue, Aug 2, 2016 at 8:29 PM, Damien Le Moal
>> wrote:
>>> Hannes, Shaun,
>>>
>>> Let me add some more comments.
>>>
>>>> On
In sd_setup_discard_cmnd() there are a some discard
methods that fall back to using WRITE_SAME. It
appears that those paths using WRITE_SAME should
also use the SD_WRITE_SAME_TIMEOUT instead of the
default SD_TIMEOUT.
Signed-off-by: Shaun Tancheff
---
I don't have a use case that break
e the trim to 16 entries when SCT is available and
bump SCT to the same 16 * 63335 maximum?
I think we can also bump the command timeout for WRITE SAME?
Suggestions are welcome.
--
Shaun Tancheff
On Wed, Aug 10, 2016 at 11:50 AM, Tom Yan wrote:
> On 10 August 2016 at 14:34, Shaun Tancheff wrote:
>>
>> You are correct in that we can advertise the larger limit in
>> ata_scsi_dev_config() when only SCT write same is supported
>> rather than fall back to WS10.
>
On Wed, Aug 10, 2016 at 5:56 AM, Tom Yan wrote:
> On 10 August 2016 at 09:00, Shaun Tancheff wrote:
>> static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc)
>> {
>> struct ata_taskfile *tf = &qc->tf;
>> struct scsi_cmnd *scm
0466-98-3593 (ext. 513593)
> 1 kirihara-cho, Fujisawa,
> Kanagawa, 252-0888 Japan
> www.hgst.com
>
> Western Digital Corporation (and its subsidiaries) E-mail Confidentiality
> Notice & Disclaimer:
>
> This e-mail and any files transmitted with it may contain confidential or
> legally privileged information of WDC and/or its affiliates, and are intended
> solely for the use of the individual or entity to which they are addressed.
> If you are not the intended recipient, any disclosure, copying, distribution
> or any action taken or omitted to be taken in reliance on it, is prohibited.
> If you have received this e-mail in error, please notify the sender
> immediately and delete the e-mail in its entirety from your system.
>
--
Shaun Tancheff
On Tue, Aug 9, 2016 at 1:47 AM, Hannes Reinecke wrote:
> On 08/05/2016 10:35 PM, Shaun Tancheff wrote:
>> On Tue, Aug 2, 2016 at 8:29 PM, Damien Le Moal
>> wrote:
>>>> On Aug 2, 2016, at 23:35, Hannes Reinecke wrote:
>>>> On 08/01/2016 07:07 PM, Shaun Ta
t set translate to SCT Write Same
Signed-off-by: Shaun Tancheff
---
v5:
- Addressed review comments
- Report support for ZBC only for zoned devices.
- kmap page during rewrite
- Fix unmap set to require trim or error, if not unmap then sct write
same or error.
v4:
- Added partial MAINTENAN
The current SATL for WRITE_SAME does not protect against misaligned
pages. Additionally the associated page should also kmap'd when
being modified.
Signed-off-by: Shaun Tancheff
---
v5: Added prep patch to work with non-page aligned scatterlist pages
and use kmap_atomic() to lock
Shaun Tancheff (2):
Use kmap_atomic when rewriting attached page
Add support for SCT Write Same
drivers/ata/libata-scsi.c | 240 --
include/linux/ata.h | 69 -
2 files changed, 252 insertions(+), 57 deletions(-)
--
2.8.1
On Tue, Aug 2, 2016 at 8:29 PM, Damien Le Moal wrote:
> Hannes, Shaun,
>
> Let me add some more comments.
>
>> On Aug 2, 2016, at 23:35, Hannes Reinecke wrote:
>>
>> On 08/01/2016 07:07 PM, Shaun Tancheff wrote:
>>> On Mon, Aug 1, 2016 at 4:41 AM, Chri
On Thu, Aug 4, 2016 at 10:46 AM, Christoph Hellwig wrote:
> On Wed, Aug 03, 2016 at 07:30:29PM -0500, Shaun Tancheff wrote:
>> I think the translation in loop.c is suspicious here:
>>
>> "if use DIO && not (a flush_flag or discard_flag)"
>> shoul
d83 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1659,8 +1659,9 @@ static int loop_queue_rq(struct blk_mq_hw_ctx *hctx,
if (lo->lo_state != Lo_bound)
return -EIO;
- if (lo->use_dio && (!(cmd->rq->cmd_flags & REQ_FLUSH) ||
- req_op(cmd->rq) == REQ_OP_DISCARD))
+ if (lo->use_dio && !(
+ (cmd->rq->cmd_flags & REQ_FLUSH) ||
+req_op(cmd->rq) == REQ_OP_DISCARD))
cmd->use_aio = true;
else
cmd->use_aio = false;
--
Shaun Tancheff
Seagate drives report a SAME code of 0 due to having:
- Zones of different types (CMR zones at the low LBA space).
- Zones of different size (A terminating 'runt' zone in the high lba space).
Support loading the zone topology into the sd_zbc zone cache.
Signed-off-by: Shaun Tan
Signed-off-by: Shaun Tancheff
Cc: Hannes Reinecke
Cc: Damien Le Moal
Cc: Dan Williams
Cc: Sagi Grimberg
Cc: Mike Christie
Cc: Toshi Kani
Cc: Kent Overstreet
Cc: Ming Lei
---
block/blk-lib.c| 3 +-
block/blk-zoned.c | 190 +
block
sd: Implement new RESET_WP provisioning mode
sd: configure ZBC devices
...
Cc: Hannes Reinecke
Cc: Damien Le Moal
Shaun Tancheff (2):
bio/zbc support for zone cache
Enable support for Seagate HostAware drives (testing).
block/blk-lib.c| 3 +-
block/bl
ps://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=CwIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=0ZPyN4vfYZXSmuCmIm3wpExF1K28PYO9KmgcqDsfQBg&s=aiguzw5_op7woZCZ5Qi7c36b16SxiWTJXshN0dG3Xyo&e=
--
Shaun Tancheff
bi_rw should be using bio_set_op_attrs to set bi_rw.
Signed-off-by: Shaun Tancheff
Cc: Chris Mason
Cc: Josef Bacik
Cc: David Sterba
Cc: Mike Christie
---
Patch is against linux-next tag next-20160729
NOTE: In 4.7 this was not including the 'WRITE' macro so may have
it ma
Add support for ZBC ioctl's
BLKREPORT- Issue Report Zones to device.
BLKOPENZONE - Issue Zone Action: Open Zone command.
BLKCLOSEZONE - Issue Zone Action: Close Zone command.
BLKRESETZONE - Issue Zone Action: Reset Zone command.
Signed-off-by: Shaun Tancheff
---
v6:
-
er
of zones in each report, but not critical.
Signed-off-by: Shaun Tancheff
---
v5:
- In sd_setup_zone_action_cmnd, remove unused vars and fix switch indent
- In blk-lib fix documentation
v4:
- Rebase on linux-next tag next-20160617.
- Change bio flags to bio op's
V3:
- Rebase on Mike
d bit for ata-passthrough flag.
V2:
- Changed bi_rw to op_flags clarify sepeartion of bio op from flags.
- Fixed memory leak in blkdev_issue_zone_report failing to put_bio().
- Documented opt in blkdev_issue_zone_report.
- Moved include/uapi/linux/fs.h changes to patch 3
- Fixed commit messag
TRIM but fail to zero blocks reliably. For example a
file-system or DM target could issue a write same w/o unmap followed
by an trim.
Signed-off-by: Shaun Tancheff
---
At some point the method of issuing Write Same for ATA drives changed.
Currently write same is commonly available via SCT so expos
[] mod_verify_sig+0x7c/0xb0
[] load_module+0x170/0x2ac0
[] ? __vfs_read+0xbd/0x110
[] ? ima_post_read_file+0x7d/0xa0
[] ? kernel_read_file+0x191/0x1b0
[] SYSC_finit_module+0xc3/0xf0
[] SyS_finit_module+0xe/0x10
[] entry_SYSCALL_64_fastpath+0x23/0xc1
Signed-off-by: Shaun Tancheff
---
lib/mpi/mpiutil.c | 8
submit_bio_wait() gives the caller an opportunity to examine
struct bio and so expects the caller to issue the put_bio()
This fixes a memory leak reported by a few people in 4.7-rc2
kmemleak report after 9082e87bfbf8 ("block: remove struct bio_batch")
Signed-off-by: Shaun Tancheff
c: linux-n...@vger.kernel.org
Cc: linux-nvd...@ml01.01.org
Cc: Christoph Hellwig
Cc: Larry Finger
Cc: Catalin Marinas
Cc: LKML ,
Cc: Jens Axboe ,
Cc: bart.vanass...@sandisk.com
Shaun Tancheff (1):
Missing bio_put following submit_bio_wait
block/blk-lib.c | 12 +---
1 file changed, 9 insert
dev, sector_t sector,
}
}
- if (bio)
+ if (bio) {
ret = submit_bio_wait(REQ_WRITE | REQ_WRITE_SAME, bio);
+ bio_put(bio);
+ }
return ret != -EOPNOTSUPP ? ret : 0;
}
EXPORT_SYMBOL(blkdev_issue_write_same);
@@ -206,8 +209,11 @@ static int __blkdev_issue_zeroout(struct
block_device *bdev, sector_t sector,
}
}
- if (bio)
- return submit_bio_wait(WRITE, bio);
+ if (bio) {
+ ret = submit_bio_wait(WRITE, bio);
+ bio_put(bio);
+ return ret;
+ }
return 0;
}
--
Shaun Tancheff
It looks like some minor changes slipped through on the RAID.
A couple of checks for REQ_PREFLUSH flag should also check for
bi_op matching REQ_OP_FLUSH.
Wrappers for sync_page_io() are passed READ/WRITE but need to
be passed REQ_OP_READ and REQ_OP_WRITE.
Signed-off-by: Shaun Tancheff
87 matches
Mail list logo