[lkml]   [2011]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] loop: add management interface for on-demand device allocation
    On Thu, Jul 28, 2011 at 12:17, Tejun Heo <> wrote:
    > On Tue, Jul 26, 2011 at 01:50:30PM +0200, Kay Sievers wrote:
    >> From: Kay Sievers <>
    >> Subject: loop: add management interface for on-demand device allocation
    >> Loop devices today have a fixed pre-allocated number of usually 8.
    >> The number can only be changed at init time. To find a free device
    >> to use, /dev/loop%i needs to be scanned and all devices need to be
    >> opened.
    > It generally looks good to me but I really hope it were split into
    > multiple patches.  I think it's a bit too big and doing too many
    > different things.  Can you please split it up?

    Hmm, split into what? Like splitting the loop-control stuff off? The
    rest can't really be split I guess, because all the linked lists need
    to be converted to idr at once.

    >> +static int loop_lookup(struct loop_device **lo, int nr);
    >> +static int loop_add(struct loop_device **lo, int nr);
    > Also, can't these return loop_device * and ERR_PTR() value on errors?

    I think ERR_PTR is a nasty hack and looks ugly, and stuff should
    return only pointers when the retuned errno can only ever be -ENOMEM,
    like on malloc(). :)

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2011-07-28 13:27    [W:0.022 / U:98.992 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site