From owner-freebsd-fs@FreeBSD.ORG Thu Mar 28 05:40:18 2013 Return-Path: Delivered-To: freebsd-fs@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 37B5379C; Thu, 28 Mar 2013 05:40:18 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qc0-x233.google.com (mail-qc0-x233.google.com [IPv6:2607:f8b0:400d:c01::233]) by mx1.freebsd.org (Postfix) with ESMTP id E260B977; Thu, 28 Mar 2013 05:40:17 +0000 (UTC) Received: by mail-qc0-f179.google.com with SMTP id b40so4068412qcq.10 for ; Wed, 27 Mar 2013 22:40:17 -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=4ffQ2MMb83OZN/KkxP4eFjkYTLMRzM7AvYSi8QxhsyA=; b=sovq3PEQrj0Xy/kr+XQ3HvLWs6oOsKsjXDE8A6ycE7CO44BKgckGg+mKSeSQwYCiAl MnRMvdPO0pMB+v9+tvVcqk0n6KQdMLaMK40+jZWGWTyjS1aFrqaG7OO9g2fekb6QZLRg r+T614tgfScnn7+8G+o5hw1XrwSeTQU+Znvmnpjysr3VpfdL2NR7ElcPUb3Y4KP+mgcD lAHLYLEkEgMHNczMCCsYk1bsD5r4T6JjdAweCNxYnaSodXhn7yxtxPFw825tvaKq0ttC aZ0qBCRlS0HcrQbCC5JDyEcujMgyMRlrfhVytzvbJowZKuLyOHUSdJmp3YlJqQHbpV1b SYpA== MIME-Version: 1.0 X-Received: by 10.49.25.202 with SMTP id e10mr20122125qeg.49.1364449217129; Wed, 27 Mar 2013 22:40:17 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.229.253.201 with HTTP; Wed, 27 Mar 2013 22:40:16 -0700 (PDT) In-Reply-To: <20130328053205.GF3794@kib.kiev.ua> References: <20130328053205.GF3794@kib.kiev.ua> Date: Wed, 27 Mar 2013 22:40:16 -0700 X-Google-Sender-Auth: zJ7rBN1qp88H4U2Qe7csJJKC1E4 Message-ID: Subject: Re: [RFC] use a shared lock for VOP_GETEXTATTR From: mdf@FreeBSD.org To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org, freebsd-current@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2013 05:40:18 -0000 On Wed, Mar 27, 2013 at 10:32 PM, Konstantin Belousov wrote: > On Wed, Mar 27, 2013 at 06:37:51PM -0700, mdf@FreeBSD.org wrote: >> VOP_GETEXTATTR is currently called with an exclusive lock, which seems >> like overkill for what is essentially a read operation. I had a look >> over the various in-tree filesystems and it didn't look like any of >> them will have a problem if a shared-mode lock is used for >> vop_getextattr. >> >> Does anyone know otherwise? Is someone using extended attributes >> regularly who can test this? > > I think this change should be fine. At least it seems to for UFS. > > What other filesystems did you audited ? I looked over zfs, pseudofs, unionfs, ffs/ufs. None seemed to have any asserts on the lock type nor anything that looked like it would try to modify anything. zfs, I think it was, even used VOP_ISLOCKED to get the lock type in one path (but I think that was after a lookup(), so it may have been on a different vnode). Cheers, matthew