lkml.org 
[lkml]   [2005]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [NBD] Use per-device semaphore instead of BKL
    Herbert Xu wrote:
    > On Sun, Nov 20, 2005 at 12:19:17PM -0500, Paul Clements wrote:
    >
    >>The dropping of the lock in nbd_do_it is actually critical to the way
    >>nbd functions. nbd_do_it runs for the lifetime of the nbd device, so if
    >>nbd_do_it were holding some lock (BKL or otherwise), we'd have big problems.
    >
    >
    > Why would you want to issue an ioctl from a different process while
    > nbd-client is still running?

    nbd-client -d (disconnect) is the main reason -- this functionality
    would be broken if we didn't allow ioctls anymore

    > Allow ioctl's while nbd_do_it is in progress is a *serious* bug. For a

    Certain ioctls, yes. There's no harm in NBD_DISCONNECT, though.

    > start, if someone else clears the socket then nbd_read_stat will crash.

    I agree, NBD_CLEAR_SOCK from another process while nbd_do_it is running
    would cause problems. But, if the user-level tools are coded properly,
    this is not an issue.

    Perhaps your ioctl lock scheme, with an exemption for NBD_DISCONNECT
    would work?

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

    \
     
     \ /
      Last update: 2005-11-20 22:45    [W:0.051 / U:0.808 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site