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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Jun 2009 15:30:14 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Jeff Moyer <jmoyer@...hat.com>
Cc:	Kiyoshi Ueda <k-ueda@...jp.nec.com>, linux-kernel@...r.kernel.org,
	device-mapper development <dm-devel@...hat.com>,
	Boaz Harrosh <bharrosh@...asas.com>,
	Jun'ichi Nomura <j-nomura@...jp.nec.com>
Subject: Re: [PATCH block#for-2.6.31] block: add request clone interface
	(v2)

On Thu, Jun 11 2009, Jeff Moyer wrote:
> Jens Axboe <jens.axboe@...cle.com> writes:
> 
> > On Thu, Jun 11 2009, Kiyoshi Ueda wrote:
> >> Hi Jens,
> >> 
> >> This patch adds the following 2 interfaces for request-stacking drivers:
> >> 
> >>   - blk_rq_prep_clone(struct request *clone, struct request *orig,
> >> 		      struct bio_set *bs, gfp_t gfp_mask,
> >> 		      int (*bio_ctr)(struct bio *, struct bio*, void *),
> >> 		      void *data)
> >>       * Clones bios in the original request to the clone request
> >>         (bio_ctr is called for each cloned bios.)
> >>       * Copies attributes of the original request to the clone request.
> >>         The actual data parts (e.g. ->cmd, ->buffer, ->sense) are not
> >>         copied.
> >> 
> >>   - blk_rq_unprep_clone(struct request *clone)
> >>       * Frees cloned bios from the clone request.
> >> 
> >> Request stacking drivers (e.g. request-based dm) need to make a clone
> >> request for a submitted request and dispatch it to other devices.
> >> 
> >> To allocate request for the clone, request stacking drivers may not
> >> be able to use blk_get_request() because the allocation may be done
> >> in an irq-disabled context.
> >> So blk_rq_prep_clone() takes a request allocated by the caller
> >> as an argument.
> >> 
> >> For each clone bio in the clone request, request stacking drivers
> >> should be able to set up their own completion handler.
> >> So blk_rq_prep_clone() takes a callback function which is called
> >> for each clone bio, and a pointer for private data which is passed
> >> to the callback.
> >> 
> >> NOTE:
> >> blk_rq_prep_clone() doesn't copy any actual data of the original
> >> request.  Pages are shared between original bios and cloned bios.
> >> So caller must not complete the original request before the clone
> >> request.
> >
> > This looks good to me now, I've applied it.
> 
> Is blk_rq_unprep_clone really the best name?
>           ^^^^^^

Probably not, but I'm not very good at coming up with elegant names.
Your email should have included a new suggestion :-)

FWIW, I don't think the name is THAT bad...

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ