Re: [PATCH 04/18] libosd: OSDv1 preliminary implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue,  4 Nov 2008 18:44:29 +0200
Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:

> Implementation of the most basic OSD functionality and
> infrastructure. Mainly Format, Create/Remove Partition,
> Create/Remove Object, and read/write.
> 
>
> ...
>
> +struct osd_request *_osd_request_alloc(gfp_t gfp)
> +{
> +	struct osd_request *or;
> +
> +	/* TODO: Use mempool with one saved request */
> +	or = kzalloc(sizeof(*or), gfp);
> +	return or;
> +}
> +
> +void _osd_request_free(struct osd_request *or)
> +{
> +	kfree(or);
> +}

These two functions can/should be made static.  Please generally check
for this.

Also it'd probably make sense to declare both these inline.  The
compiler _shoudl_ get it right, but stranger things have happened...

>
> ...
>
> +/*
> + * If osd_finalize_request() was called but the request was not executed through
> + * the block layer, then we must release BIOs.
> + */
> +static void _abort_unexecuted_bios(struct request *rq)
> +{
> +	struct bio *bio;
> +
> +	while ((bio = rq->bio) != NULL) {
> +		rq->bio = bio->bi_next;
> +		bio_endio(bio, 0);
> +	}
> +}

Boy, that's a scary function.  bye-bye data.


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux