Re: [PATCH 02/12] handle multiple network paths to AoE device

Ed L. Cashin
2007-07-11T14:50:29Z

On Mon, Jul 02, 2007 at 09:29:49PM -0700, Andrew Morton wrote:
> On Tue, 26 Jun 2007 14:50:10 -0400 "Ed L. Cashin" <ecashin@coraid.com> wrote:
...
> > +loop:
> > + skb = aoecmd_ata_id(d);
> > spin_unlock_irqrestore(&d->lock, flags);
> > + if (!skb && !msleep_interruptible(200)) {
> > + spin_lock_irqsave(&d->lock, flags);
> > + goto loop;
> > + }
> > + aoenet_xmit(skb);
> > aoecmd_cfg(major, minor);
> > -
> > return 0;
> > }
>
> interruptible sleep? Does this code work as intended when there's a signal
> pending? (Maybe that's what the interruptible sleep is for: don't know,
> and am not inclined to work it out given the (low) level of comments in
> here and the (lower) level of changelogging).

Yes, if a signal is pending, then msleep_interruptible will not return
0. That means we will not loop but will call aoenet_xmit with a NULL
skb, which is a noop. So if the system is too low on memory or the
aoe driver is too low on frames, then the user can hit control-C to
interrupt the attempt to do a revalidate.

I will add a comment to that effect in the resubmitted patch.

--
Ed L Cashin <ecashin@coraid.com>