* [PATCH 0/1] DASD: fix discard for FBA devices
@ 2020-09-14 11:56 Stefan Haberland
2020-09-14 11:56 ` [PATCH 1/1] s390/dasd: Fix zero write " Stefan Haberland
2020-09-15 1:41 ` [PATCH 0/1] DASD: fix discard " Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Haberland @ 2020-09-14 11:56 UTC (permalink / raw)
To: axboe; +Cc: linux-block, hoeppner, linux-s390, heiko.carstens, gor, borntraeger
Hi Jens,
please see the following patch that fixes zero writes for DASD FBA devices under certain conditions.
Do you mind to take this for 5.9?
Jan Höppner (1):
s390/dasd: Fix zero write for FBA devices
drivers/s390/block/dasd_fba.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] s390/dasd: Fix zero write for FBA devices
2020-09-14 11:56 [PATCH 0/1] DASD: fix discard for FBA devices Stefan Haberland
@ 2020-09-14 11:56 ` Stefan Haberland
2020-09-15 1:41 ` [PATCH 0/1] DASD: fix discard " Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Haberland @ 2020-09-14 11:56 UTC (permalink / raw)
To: axboe; +Cc: linux-block, hoeppner, linux-s390, heiko.carstens, gor, borntraeger
From: Jan Höppner <hoeppner@linux.ibm.com>
A discard request that writes zeros using the global kernel internal
ZERO_PAGE will fail for machines with more than 2GB of memory due to the
location of the ZERO_PAGE.
Fix this by using a driver owned global zero page allocated with GFP_DMA
flag set.
Fixes: 28b841b3a7cb ("s390/dasd: Add discard support for FBA devices")
Cc: <stable@vger.kernel.org> # 4.14+
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
---
drivers/s390/block/dasd_fba.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index cbb770824226..1a44e321b54e 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -40,6 +40,7 @@
MODULE_LICENSE("GPL");
static struct dasd_discipline dasd_fba_discipline;
+static void *dasd_fba_zero_page;
struct dasd_fba_private {
struct dasd_fba_characteristics rdc_data;
@@ -270,7 +271,7 @@ static void ccw_write_zero(struct ccw1 *ccw, int count)
ccw->cmd_code = DASD_FBA_CCW_WRITE;
ccw->flags |= CCW_FLAG_SLI;
ccw->count = count;
- ccw->cda = (__u32) (addr_t) page_to_phys(ZERO_PAGE(0));
+ ccw->cda = (__u32) (addr_t) dasd_fba_zero_page;
}
/*
@@ -830,6 +831,11 @@ dasd_fba_init(void)
int ret;
ASCEBC(dasd_fba_discipline.ebcname, 4);
+
+ dasd_fba_zero_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
+ if (!dasd_fba_zero_page)
+ return -ENOMEM;
+
ret = ccw_driver_register(&dasd_fba_driver);
if (!ret)
wait_for_device_probe();
@@ -841,6 +847,7 @@ static void __exit
dasd_fba_cleanup(void)
{
ccw_driver_unregister(&dasd_fba_driver);
+ free_page((unsigned long)dasd_fba_zero_page);
}
module_init(dasd_fba_init);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] DASD: fix discard for FBA devices
2020-09-14 11:56 [PATCH 0/1] DASD: fix discard for FBA devices Stefan Haberland
2020-09-14 11:56 ` [PATCH 1/1] s390/dasd: Fix zero write " Stefan Haberland
@ 2020-09-15 1:41 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2020-09-15 1:41 UTC (permalink / raw)
To: Stefan Haberland
Cc: linux-block, hoeppner, linux-s390, heiko.carstens, gor, borntraeger
On 9/14/20 5:56 AM, Stefan Haberland wrote:
> Hi Jens,
>
> please see the following patch that fixes zero writes for DASD FBA devices under certain conditions.
>
> Do you mind to take this for 5.9?
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-15 1:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14 11:56 [PATCH 0/1] DASD: fix discard for FBA devices Stefan Haberland
2020-09-14 11:56 ` [PATCH 1/1] s390/dasd: Fix zero write " Stefan Haberland
2020-09-15 1:41 ` [PATCH 0/1] DASD: fix discard " Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).