[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F6A7DE9.8080401@panasas.com>
Date: Wed, 21 Mar 2012 18:18:33 -0700
From: Boaz Harrosh <bharrosh@...asas.com>
To: "Myklebust, Trond" <Trond.Myklebust@...app.com>
CC: Greg KH <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Rafael J. Wysocki" <rjw@...k.pl>,
"keyrings@...ux-nfs.org" <keyrings@...ux-nfs.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
NFS list <linux-nfs@...r.kernel.org>,
"Bhamare, Sachin" <sbhamare@...asas.com>,
David Howells <dhowells@...hat.com>,
Eric Paris <eparis@...hat.com>,
"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
Kay Sievers <kay.sievers@...y.org>,
James Morris <jmorris@...ei.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCHSET 0/4] kmod: Optional timeout on the wait in call_usermodehelper_exec
On 03/21/2012 05:31 PM, Myklebust, Trond wrote:
> On Wed, 2012-03-21 at 17:18 -0700, Boaz Harrosh wrote:
>> On 03/21/2012 08:35 AM, Greg KH wrote:
>>> On Tue, Mar 20, 2012 at 04:18:49PM -0700, Boaz Harrosh wrote:
>>>> Andrew Hi
>>>>
>>>> I'm picking on you because I don't have any one else to pick on.
>>>> The 3 first patches here, are just good for today. Please see if
>>>> you would like to take them? or tell me who should take them?
>>>>
>>>> The 4th patch is an RFC, which got me looking into this.
>>>>
>>>> My motivation is that I added yet another Kernel dependency on the
>>>> call_usermodehelper() function and am not completely happy with the
>>>> error case of having the user-mode program stuck forever. In such
>>>> case I would like the Kernel part to timeout and properly error recover
>>>> and clean up. So therefor the proposed 4th patch.
>>>
>>> What is this new use of call_usermodhelper that you are doing this work
>>> for? Ideally, you never want to make this call, as it's slow and messy,
>>> as you have found out. Is there an in-kernel user that you have
>>> recently added?
>>>
>>> thanks,
>>>
>>> greg k-h
>>
>> I agree hence my comment in the 4th patch:
>> "In the blasphemous occasions that a the Kernel must call a user-mode program"
>>
>> I have added a new caller, to the nfs/objectlayoutdriver.ko that uses this
>> facility for auto-login into osd-targets (iscsi-targets) when new are requested
>> by the filesystem. This auto-login facility is mandated by the pnfs-objects
>> standard because in a large cluster filesystems for which pnfs was invented, storage
>> devices break and changed everyday, and a manual login by every client is not
>> feasible.
>>
>> You can see this patch as posted to the mailing list here:
>> http://article.gmane.org/gmane.linux.nfs/48024/match=login
>> [title: pnfs-obj: autologin: Add support for protocol autologin]
>>
>> It works very well and was heavily tested, with all error scenarios, but
>> the theoretical possibility that the user-mode program can be stuck forever
>> bothers me and I would like to do something about it. With this patch the
>> Kernel can recover cleanly and continue. I have actually tested this part
>> and it works as expected.
>
> Hi Boaz,
>
> As an alternative suggestion: since you are always calling the
> same /sbin/osd_login userspace program, wouldn't it be easier to add the
> timeout smarts into that program? If you can't modify the osd_login
> program itself, then it should still be trivial to wrap it with a script
> that adds the 'timeout' command prefix.
>
That's a good idea. The osd_login is a script supplied by us. And should
be submitted to nfs-utils by Steve. See the 4th patch sent as part of the
login patchset. I will change it to fork and timeout properly.
Regardless, for the long run I would like to pursue the Kernel-side timeout
as well, since that would be the more robust thing to do. Also in the light
that we provide root with the means to register a new osd_login program.
> Cheers
> Trond
Thanks
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists