public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Bob Smart <smart@hpc.CSIRO.AU>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Red Hat needs this patch (was Re: handling NFSERR_JUKEBOX)
Date: 06 Nov 2001 14:54:24 +0100	[thread overview]
Message-ID: <shsg07sknsf.fsf@charged.uio.no> (raw)
In-Reply-To: <200111061036.VAA07886@trout.hpc.CSIRO.AU>
In-Reply-To: <200111061036.VAA07886@trout.hpc.CSIRO.AU>

>>>>> " " == Bob Smart <smart@hpc.CSIRO.AU> writes:

     > Maybe there is a subset of servers for which the patch is OK,
     > and we could make that clear in the help for the config
     > option. I'll ask Cray for clarification about their server.

I'm still not convinced this is a good idea, but if you are going to
do things inside the NFS client, why don't you instead write a wrapper
function around rpc_call_sync() for fs/nfs/nfs3proc.c. Something like

static int
nfs_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
{
        sigset_t oldset;
        int res;
        rpc_clnt_sigmask(clnt, &oldset);
        do {
                res = rpc_call_sync(clnt, msg, flags);
                if (result != -EJUKEBOX)
                        break;
                set_current_state(TASK_INTERRUPTIBLE);
                schedule_timeout(NFS_JUKEBOX_RETRY_TIME);
                res = -ERESTARTSYS;
        } while (!signalled());
        rpc_clnt_sigunmask(clnt, &oldset);
        return res;
}

and then use a couple of '#define's to wrap rpc_call() and
rpc_call_sync() in nfs3_proc_*(). That will take care of all those
synchronous calls in one fell swoop.

You'll still need to take care of asynchronous reads, writes and
unlink, but those are easy. Just do something like

if (task->tk_error == -EJUKEBOX) {
        rpc_delay(task, NFS_JUKEBOX_RETRY_TIMEO);
        rpc_restart_call(task);
        return;
}

in nfs_readpage_result(), nfs_writeback_done(), nfs_commit_done(), and
nfs_async_unlink_done()...

Cheers,
   Trond

  reply	other threads:[~2001-11-06 13:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10  0:23 handling NFSERR_JUKEBOX Bob Smart
2001-07-13 14:06 ` Pete Wyckoff
2001-11-06  5:21   ` Red Hat needs this patch (was Re: handling NFSERR_JUKEBOX) Bob Smart
2001-11-06  9:05     ` Trond Myklebust
2001-11-06  9:10       ` Marcelo Tosatti
2001-11-06 10:53         ` Trond Myklebust
2001-11-06 10:36       ` Bob Smart
2001-11-06 13:54         ` Trond Myklebust [this message]
2001-11-06 23:41           ` handling NFSERR_JUKEBOX Trond Myklebust
2001-11-08 16:20             ` Pete Wyckoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=shsg07sknsf.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smart@hpc.CSIRO.AU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox