From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 1 20:04:23 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2B824A86; Mon, 1 Apr 2013 20:04:23 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qe0-f52.google.com (mail-qe0-f52.google.com [209.85.128.52]) by mx1.freebsd.org (Postfix) with ESMTP id D401ADAA; Mon, 1 Apr 2013 20:04:22 +0000 (UTC) Received: by mail-qe0-f52.google.com with SMTP id jy17so1441891qeb.11 for ; Mon, 01 Apr 2013 13:04:22 -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=bfESOvNo2QgWF66FxEJQCxxbe7vhvgChN5hpEavAMME=; b=wu9sNQR0i3dGxXNTrqeoZZFbbUYaoSRglbmq1CkrMQRiwnYaq2ZBM2MEcw+56HMHDu hLJ/LqrDQQGl1maFz4uD4i6KLcYWdEXHlduJGyvDCQVRESWNQmJ4sNHhTTYGxy1/8zAt swA/P9Fksk5vhNtMaODGJpsgBOuPzqbOE6cIdqn5O/W4NBHukZrhhzg0IggAMI5kDfWv n5BsmduF2AcRjWZAvFwAj0inMGM+Deg7VQ+3cLBzeg4SdOuh9jYrJPM6EGUM7OzbcPsz b7yziimWVc5juNyrAzmCyGkWmFKdzKM0KeXVucWUSnUB/Ps360o8l/dn5xx1WFsFIozo kpZg== MIME-Version: 1.0 X-Received: by 10.229.62.200 with SMTP id y8mr2412309qch.128.1364846206610; Mon, 01 Apr 2013 12:56:46 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.229.253.201 with HTTP; Mon, 1 Apr 2013 12:56:46 -0700 (PDT) In-Reply-To: References: <201304011424.19784.jhb@freebsd.org> Date: Mon, 1 Apr 2013 12:56:46 -0700 X-Google-Sender-Auth: gnR38LmtGfxcR4O_6PL_Ey-M8DU 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 20:04:23 -0000 On Mon, Apr 1, 2013 at 12:51 PM, wrote: > 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 > And I found the old thread: http://lists.freebsd.org/pipermail/freebsd-current/2011-December/030567.html I guess my memory really does just suck. I now remember what I posted, but only after reading it again. :-) Cheers, matthew