lkml.org 
[lkml]   [2003]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI
On Wed, 25 Jun 2003, Lou Langholtz wrote:

> Reviewing the code some more, I'm not sure why I moved the tx_lock out
> from nbd_send_req(). Some possible explanations are:
>
> 2. keeps the locking at the same level as the spin_unlock_irq() which
> makes lock analysis a little easier. it's also a more consistant
> level to have at for consistantly locking accross all the ioctl
> handling.

But, unless the locks are overlapping (which they did not used to be) there
really is nothing to analyze in the first place...it's just obviously
correct, right?


> 4. in order to have the locking inside nbd_send_req it would seem
> it'd help to make nbd_send_req return a value that could be checked.

That's not an unreasonable thing to do...it'd be a much more minor change.
I guess I'm just having a hard time seeing the benefit of rearranging
all this code. Unless there's some substantial benefit, it seems wiser
to keep the changes as minimal as possible...after all, the current code
does work.


> week. In the meantime, the nbd-client tool currently can't correctly set
> the size of the device and either that needs to be worked around in the
> driver (I'd done that in the original jumbo patch), or the nbd-client
> tool needs to be updated (the patch I'd mailed out for nbd-client works
> around the sizing issue by re-opening the nbd). To be clear, that's not
> something any of the changes that have gone in so far broke nor address.

I'm in favor of doing the minor change in the driver to maintain
compatibility with existing userland tools. It's a pretty simple fix...

The patch will be coming shortly...

--
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-03-22 13:36    [W:0.069 / U:2.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site