[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHQdGtTEhYWcVaahYx_ajsp8-V0GEF7NEU7cPnLUQz+pCzuniA@mail.gmail.com>
Date: Thu, 28 May 2015 19:39:54 -0400
From: Trond Myklebust <trond.myklebust@...marydata.com>
To: Andreas Gruenbacher <andreas.gruenbacher@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
Linux NFS Mailing List <linux-nfs@...r.kernel.org>
Subject: Re: [RFC v3 38/45] nfs/sunrpc: Return status code from encode functions
On Fri, Apr 24, 2015 at 7:04 AM, Andreas Gruenbacher
<andreas.gruenbacher@...il.com> wrote:
> Return a status code from the sunrpc xdr encode functions. While these
> functions were originally returning a status code before commit 9f06c719 from
> December 2010, it was found that none of them can actually fail and so they
> were turned into void functions. With more complex objects like NFSv4 ACLs to
> encode, it makes sense to do memory allocations and some of the error checking
> inside the encode functions, so those functions may fail.
The standard way to do this is to allocate the xdr buffer and perform
the xdr encoding outside the RPC call itself. Please see the
layoutcommit function, for instance.
Trond
--
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