From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: linux-nfs-owner@vger.kernel.org Received: from natasha.panasas.com ([67.152.220.90]:45385 "EHLO natasha.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754039Ab2CSU64 (ORCPT ); Mon, 19 Mar 2012 16:58:56 -0400 Message-ID: <4F679DEF.3040002@panasas.com> Date: Mon, 19 Mar 2012 13:58:23 -0700 From: Boaz Harrosh MIME-Version: 1.0 To: "Myklebust, Trond" CC: NFS list , open-osd , "Bhamare, Sachin" , Benny Halevy , Steve Dickson , "Welch, Brent" Subject: Re: [PATCH 3/4] pnfs-obj: autologin: Add support for protocol autologin References: <4F62DADD.3010502@panasas.com> <4F62DC6A.5080709@panasas.com> <1331934052.13255.7.camel@lade.trondhjem.org> In-Reply-To: <1331934052.13255.7.camel@lade.trondhjem.org> Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org List-ID: On 03/16/2012 02:40 PM, Myklebust, Trond wrote: > On Thu, 2012-03-15 at 23:23 -0700, Boaz Harrosh wrote: >> From: Sachin Bhamare >> >> The pnfs-objects protocol mandates that we autologin into devices not >> present in the system, according to information specified in the >> get_device_info returned from the server. >> >> The Protocol specifies two login hints. >> 1. An IP address:port combination >> 2. A string URI which is constructed as a URL with a protocol prefix >> followed by :// and a string as address. For each protocol prefix >> the string-address format might be different. >> >> We only support the second option. The first option is just redundant >> to the second one. >> NOTE: The Kernel part of autologin does not parse the URI string. It >> just channels it to a user-mode script. So any new login protocols should >> only update the user-mode script which is a part of the nfs-utils package, >> but the Kernel need not change. >> >> We implement the autologin by using the call_usermodehelper() API. >> (Thanks to Steve Dickson for pointing it out) >> So there is no running daemon needed, and or special setup. >> >> All is needed is that "/sbin/osd_login" script exists. >> TODO: >> "osd_login" is an hard coded name. If not present we will rate_limit >> print to dmsg and keep failing. In such cases we should stop trying >> and provide sysfs interface for re-enabling autologin. For example, >> we could ZERO out the script name and let user-mode set a new script >> name. >> [Q] Where in sysfs should a layout-driver put its things? > > Please see fs/nfs/cache_lib.c, which already does this sort of thing. > The right thing to do is not sysfs, but a kernel module parameter. > I have a question about the "kernel module parameter" is that an hot affair. I mean if the module is loaded, does it have to be unloaded before I can specify a new "module parameter" on load. Or it will update globally even if the module is already loaded? The reason I'm asking is because the layout-driver is referenced by nfs-core on mount. And will not release until unmount, of the last pnf-objects mount-point. That's why I thought of a /sys so all mount-points need not be unmounted before admin can fix the problem. > Thanks Boaz