Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Apr 2013 16:14:33 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        mdf@freebsd.org
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: extattr_set_* return type
Message-ID:  <201304011614.33363.jhb@freebsd.org>
In-Reply-To: <CAMBSHm-JK4o3e3b04B%2Byz5n%2B290G1iQawbSQkvuq%2BAXUz6jdhw@mail.gmail.com>
References:  <CAMBSHm9kBuE4H5VDT3iHTsis24-J3nj8hhLBjOX3DS4k5qZRKA@mail.gmail.com> <CAMBSHm_pBqyGZTjZj9PhxC%2BMhRyOSf=EJbC3N6SLeJw-BUN=Kw@mail.gmail.com> <CAMBSHm-JK4o3e3b04B%2Byz5n%2B290G1iQawbSQkvuq%2BAXUz6jdhw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, April 01, 2013 3:56:46 pm mdf@freebsd.org wrote:
> On Mon, Apr 1, 2013 at 12:51 PM, <mdf@freebsd.org> wrote:
> 
> > On Mon, Apr 1, 2013 at 11:24 AM, John Baldwin <jhb@freebsd.org> wrote:
> >
> >> On Saturday, March 30, 2013 5:30:21 pm mdf@freebsd.org wrote:
> >> > Despite the man page correctly describing the return value for
> >> > extattr_set_*, I thought recently that they returned 0/-1 for
> >> > success/failure, not the number of bytes written, like write(2).  This
> >> is
> >> > because extattr_set_* is declared as returning an int, not an ssize_t.
> >> >  Both extattr_get and extattr_list return ssize_t, so this is
> >> inconsistent.
> >> >
> >> > The patch at
> >> >
> >> http://people.freebsd.org/~mdf/0001-Fix-return-type-of-extattr_set_-and-
fix-
> >> rmextattr-8-.patchfixes<http://people.freebsd.org/~mdf/0001-Fix-return-
type-of-extattr_set_-and-fix-rmextattr-8-.patchfixes>
> >> > this.  It compiles but it's untested.
> >> >
> >> > I don't think any compat shims are needed, since an old application 
will
> >> > still sign extend and this will work (it's very unlikely anyone does
> >> > extattr_set for 2GB or more).
> >> >
> >> > If anyone actually uses extattr on 64-bit, please test a new kernel but
> >> old
> >> > userspace to be sure nothing is broken.  I plan to commit this next
> >> week if
> >> > I don't hear otherwise.
> >>
> >> Hmm, the patch URL doesn't work, but please fix this.  There is an old
> >> thread
> >> we are both on from Dec 2011 where I ran into the same thing.  I also
> >> think we
> >> don't need compat shims.
> >>
> >
> > The version in my outbox looked right; I don't know how it got mangled.
> >
> >
> > http://people.freebsd.org/~mdf/0001-Fix-return-type-of-extattr_set_-and-
fix-
> > <http://people.freebsd.org/~mdf/0001-Fix-return-type-of-extattr_set_-and-
fix-rmextattr-8-.patchfixes>
> > rmextattr-8-.patch<http://people.freebsd.org/~mdf/0001-Fix-return-type-of-
extattr_set_-and-fix-rmextattr-8-.patchfixes>
> >

Somehow the space between 'patch' at the end of the URL and 'fixes' kept 
getting eaten.  I worked it out though and your patch looks fine to me.  I 
think we can just punt on doing symver and commit it as is.  Thanks for fixing 
this!

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304011614.33363.jhb>