Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2013 18:31:02 -0700
From:      Matthew Fleming <mdf356@gmail.com>
To:        freebsd-current@freebsd.org, freebsd-fs@freebsd.org
Subject:   [RFC] use a shared lock for VOP_GETEXTATTR
Message-ID:  <CAMBSHm8Akz2-tUhjYm9%2BH3YTN31N8=OhGHX1ZpdV4-VixFQm%2BQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000e0cd5ccee951c6904d8f21bef
Content-Type: text/plain; charset=ISO-8859-1

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?

Thanks,
matthew

--000e0cd5ccee951c6904d8f21bef
Content-Type: application/octet-stream; 
	name="0001-Use-a-shared-lock-for-VOP_GETEXTATTR-as-it-is-a-read.patch"
Content-Disposition: attachment; 
	filename="0001-Use-a-shared-lock-for-VOP_GETEXTATTR-as-it-is-a-read.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_het8w2zm0

RnJvbSBhYTZkNmM3MTZiZDE5Y2UzMmUzYjkwODcyN2ZiZGE2NWQzNDViN2FiIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0aGV3IEZsZW1pbmcgPG1kZkBGcmVlQlNELm9yZz4KRGF0
ZTogV2VkLCAyNyBNYXIgMjAxMyAxODoyMzoxNyAtMDcwMApTdWJqZWN0OiBbUEFUQ0hdIFVzZSBh
IHNoYXJlZCBsb2NrIGZvciBWT1BfR0VURVhUQVRUUiwgYXMgaXQgaXMgYSByZWFkLWxpa2Ugb3Bl
cmF0aW9uLgoKTUZDIGFmdGVyOgkxIHdlZWsKLS0tCiBzeXMva2Vybi92ZnNfZXh0YXR0ci5jIHwg
ICAgMiArLQogc3lzL2tlcm4vdmZzX3Zub3BzLmMgICB8ICAgIDIgK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leCBjOGY4MzJmLi42ODQ5NzMwIDEwMDY0NAot
LS0gYS9zeXMva2Vybi92ZnNfdm5vcHMuYworKysgYi9zeXMva2Vybi92ZnNfdm5vcHMuYwpAQCAt
MTc1MywxNyArMTc1MywxNyBAQCB2bl9leHRhdHRyX2dldChzdHJ1Y3Qgdm5vZGUgKnZwLCBpbnQg
aW9mbGcsIGludCBhdHRybmFtZXNwYWNlLAogCWF1aW8udWlvX2lvdmNudCA9IDE7CiAJYXVpby51
aW9fcncgPSBVSU9fUkVBRDsKIAlhdWlvLnVpb19zZWdmbGcgPSBVSU9fU1lTU1BBQ0U7CiAJYXVp
by51aW9fdGQgPSB0ZDsKIAlhdWlvLnVpb19vZmZzZXQgPSAwOwogCWF1aW8udWlvX3Jlc2lkID0g
KmJ1ZmxlbjsKIAogCWlmICgoaW9mbGcgJiBJT19OT0RFTE9DS0VEKSA9PSAwKQotCQl2bl9sb2Nr
KHZwLCBMS19FWENMVVNJVkUgfCBMS19SRVRSWSk7CisJCXZuX2xvY2sodnAsIExLX1NIQVJFRCB8
IExLX1JFVFJZKTsKIAogCUFTU0VSVF9WT1BfTE9DS0VEKHZwLCAiSU9fTk9ERUxPQ0tFRCB3aXRo
IG5vIHZwIGxvY2sgaGVsZCIpOwogCiAJLyogYXV0aG9yaXplIGF0dHJpYnV0ZSByZXRyaWV2YWwg
YXMga2VybmVsICovCiAJZXJyb3IgPSBWT1BfR0VURVhUQVRUUih2cCwgYXR0cm5hbWVzcGFjZSwg
YXR0cm5hbWUsICZhdWlvLCBOVUxMLCBOVUxMLAogCSAgICB0ZCk7CiAKIAlpZiAoKGlvZmxnICYg
SU9fTk9ERUxPQ0tFRCkgPT0gMCkKLS0gCjEuNy4zLjIKCg==
--000e0cd5ccee951c6904d8f21bef--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMBSHm8Akz2-tUhjYm9%2BH3YTN31N8=OhGHX1ZpdV4-VixFQm%2BQ>