[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090609180344.GQ11363@kernel.dk>
Date: Tue, 9 Jun 2009 20:03:44 +0200
From: Jens Axboe <jens.axboe@...cle.com>
To: Kiyoshi Ueda <k-ueda@...jp.nec.com>
Cc: linux-kernel@...r.kernel.org,
device-mapper development <dm-devel@...hat.com>,
Jun'ichi Nomura <j-nomura@...jp.nec.com>
Subject: Re: [PATCH block#for-2.6.31] block: add request clone interface
On Tue, Jun 09 2009, Kiyoshi Ueda wrote:
> Hi Jens,
>
> +/*
> + * Copy request information of the original request to the clone request.
> + */
> +static void __blk_rq_prep_clone(struct request *dst, struct request *src)
> +{
> + dst->cpu = src->cpu;
> + dst->cmd_flags = (rq_data_dir(src) | REQ_NOMERGE);
> + dst->cmd_type = src->cmd_type;
> + dst->__sector = blk_rq_pos(src);
> + dst->__data_len = blk_rq_bytes(src);
> + dst->nr_phys_segments = src->nr_phys_segments;
> + dst->ioprio = src->ioprio;
> + dst->buffer = src->buffer;
> + dst->cmd_len = src->cmd_len;
> + dst->cmd = src->cmd;
Are you making sure that 'src' always exists while 'dst' is alive?
--
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