calling dm_io
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mikulas Patocka
maintainerIt doesn't seem to matter if you use REQ_FLUSH or WRITE_FLUSH, but for consistency, you can apply this patch.
Quoted 50 lines · Alasdair G Kergon
We use a mixture of
REQ_FLUSHandWRITE_FLUSHin dm.fs.h:#define
WRITE_FLUSH(WRITE |REQ_SYNC|REQ_NOIDLE|REQ_FLUSH)Could you do a quick check that we always use the right one in the right places?
Alasdair
----- Forwarded message from "Kasatkin, Dmitry" <[email protected]> -----
Date: Thu, 8 Nov 2012 19:51:36 +0200
From: "Kasatkin, Dmitry" <[email protected]>
Subject: Re: [dm-devel] callingdm_io
To: device-mapper development <[email protected]>Quoted 6 lines · Alasdair G Kergon
Quoted 2 lines · Dmitry
So it expects caller to initialize notify.fn, but in couple of places it is not done when allocating on stack...
As far as I can see it is initialised where it needs to be.
Quoted 8 lines
Quoted 4 lines
struct dm_io_request io_req = { ...., .notify.fn = NULL, };(Struct members not listed explicitly are initialised according to the same rules used for initialising static variables. IOW a pointer is initialised to NULL.)
oh. indeed.
dm_bufio_issue_flush()usesREQ_FLUSH, but all other places in the kernel useWRITE_FLUSH...
Shoulddm_bufio_issue_flush()also useWRITE_FLUSH?- Dmitry
Quoted 7 lines
Alasdair
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Quoted 7 lines
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel----- End forwarded message -----
dm-bufio: use WRITE_FLUSH instead of REQ_FLUSH
Use WRITE_FLUSH instead of REQ_FLUSH to make it consistent with the rest of the kernel. There is no functional change - the kernel accepts either WRITE_FLUSH or REQ_FLUSH.
--- drivers/md/dm-bufio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-bufio.c +1 -1
@@ -1194,7 +1194,7 @@ EXPORT_SYMBOL_GPL(dm_bufio_write_dirty_bint dm_bufio_issue_flush (struct dm_bufio_client *c) {struct dm_io_request io_req = { - .bi_rw =REQ_FLUSH , + .bi_rw =WRITE_FLUSH , .mem.type =DM_IO_KMEM , .mem.ptr.addr =NULL , .client = c->dm_io,