lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 11 Jun 2019 12:04:21 -0400 (EDT) From: Pankaj Gupta <pagupta@...hat.com> To: Mike Snitzer <snitzer@...hat.com> Cc: rdunlap@...radead.org, jack@...e.cz, kvm@...r.kernel.org, mst@...hat.com, jasowang@...hat.com, david@...morbit.com, qemu-devel@...gnu.org, virtualization@...ts.linux-foundation.org, dm-devel@...hat.com, adilger kernel <adilger.kernel@...ger.ca>, zwisler@...nel.org, aarcange@...hat.com, dave jiang <dave.jiang@...el.com>, jstaron@...gle.com, linux-nvdimm@...ts.01.org, vishal l verma <vishal.l.verma@...el.com>, david@...hat.com, willy@...radead.org, hch@...radead.org, linux-acpi@...r.kernel.org, jmoyer@...hat.com, linux-ext4@...r.kernel.org, lenb@...nel.org, kilobyte@...band.pl, riel@...riel.com, yuval shaia <yuval.shaia@...cle.com>, stefanha@...hat.com, imammedo@...hat.com, dan j williams <dan.j.williams@...el.com>, lcapitulino@...hat.com, kwolf@...hat.com, nilal@...hat.com, tytso@....edu, xiaoguangrong eric <xiaoguangrong.eric@...il.com>, cohuck@...hat.com, rjw@...ysocki.net, linux-kernel@...r.kernel.org, linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org, pbonzini@...hat.com, darrick wong <darrick.wong@...cle.com> Subject: Re: [Qemu-devel] [PATCH v11 4/7] dm: enable synchronous dax > > > Hi Mike, > > > > Thanks for the review Please find my reply inline. > > > > > > > > dm_table_supports_dax() is called multiple times (from > > > dm_table_set_restrictions and dm_table_determine_type). It is strange > > > to have a getter have a side-effect of being a setter too. Overloading > > > like this could get you in trouble in the future. > > > > > > Are you certain this is what you want? > > > > I agree with you. > > > > > > > > Or would it be better to refactor dm_table_supports_dax() to take an > > > iterate_devices_fn arg and have callers pass the appropriate function? > > > Then have dm_table_set_restrictions() caller do: > > > > > > if (dm_table_supports_dax(t, device_synchronous, NULL)) > > > set_dax_synchronous(t->md->dax_dev); > > > > > > (NULL arg implies dm_table_supports_dax() refactoring would take a int > > > *data pointer rather than int type). > > > > > > Mike > > > > > > > I am sending below patch as per your suggestion. Does it look > > near to what you have in mind? > > Yes, it does.. just one nit I noticed inlined below. > > > diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c > > index 350cf0451456..8d89acc8b8c2 100644 > > --- a/drivers/md/dm-table.c > > +++ b/drivers/md/dm-table.c > > ... > > > @@ -1910,8 +1919,13 @@ void dm_table_set_restrictions(struct dm_table *t, > > struct request_queue *q, > > } > > blk_queue_write_cache(q, wc, fua); > > > > - if (dm_table_supports_dax(t, PAGE_SIZE)) > > + if (dm_table_supports_dax(t, device_supports_dax, &page_size)) { > > + > > No need for an empty newline here ^ Sure. Will remove this and send official v12 patchset with the updated patch 4. Thanks, Pankaj > > > blk_queue_flag_set(QUEUE_FLAG_DAX, q); > > + if (dm_table_supports_dax(t, device_synchronous, NULL)) > > + set_dax_synchronous(t->md->dax_dev); > > + } > > else > > blk_queue_flag_clear(QUEUE_FLAG_DAX, q); > > > > Thanks, > Mike > >
Powered by blists - more mailing lists