From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 1 19:51:47 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B20166F9; Mon, 1 Apr 2013 19:51:47 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qa0-f50.google.com (mail-qa0-f50.google.com [209.85.216.50]) by mx1.freebsd.org (Postfix) with ESMTP id 66B80D1F; Mon, 1 Apr 2013 19:51:47 +0000 (UTC) Received: by mail-qa0-f50.google.com with SMTP id bv4so1062596qab.9 for ; Mon, 01 Apr 2013 12:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=aTNy66S5LyCtx+/VIp+pze2r1lt8v0P7gM0PSsdRABY=; b=Jzs3w+CWRINnFw/DGAgzXmf1WAm5CKzGajbxs3ZCya+629ZVHplKCxpo4/vdyOGCUL faWzj2rup0Fv/BgPezkJ7CVnkXo10n9P5KRSizhuA+Bsm+SraB4q5+GigtiXagDwxKkt xbToitvl9fWx7EIjCNbXFLh3ktWABkLgaaM4lSxjjATGNmt7nwCRfk550p/eRWhXA92Y W6hBrEGdh9861iO2A0y9J+9K0h9FfWNa8plcaES/gjIARdPUiIrVUtxEUitP1rCUawgX 9zS1vx2peHUsgdjjgAwqA7C/wGgnW9pV1xovhTboKuqu63EPz/XFAo1oxXQL6LqixgVi xB8A== MIME-Version: 1.0 X-Received: by 10.224.33.14 with SMTP id f14mr13672757qad.69.1364845906591; Mon, 01 Apr 2013 12:51:46 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.229.253.201 with HTTP; Mon, 1 Apr 2013 12:51:46 -0700 (PDT) In-Reply-To: <201304011424.19784.jhb@freebsd.org> References: <201304011424.19784.jhb@freebsd.org> Date: Mon, 1 Apr 2013 12:51:46 -0700 X-Google-Sender-Auth: 8oGjy_nQDnvOWik8_MNXBM7BG2Y Message-ID: Subject: Re: extattr_set_* return type From: mdf@FreeBSD.org To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Apr 2013 19:51:47 -0000 On Mon, Apr 1, 2013 at 11:24 AM, John Baldwin 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 > > 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- rmextattr-8-.patch Cheers, matthew