lkml.org 
[lkml]   [2015]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC v3 38/45] nfs/sunrpc: Return status code from encode functions
From
On Fri, Apr 24, 2015 at 7:04 AM, Andreas Gruenbacher
<andreas.gruenbacher@gmail.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


\
 
 \ /
  Last update: 2015-05-29 02:21    [W:0.521 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site