Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752253AbdGFQOQ (ORCPT ); Thu, 6 Jul 2017 12:14:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55832 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751751AbdGFQOO (ORCPT ); Thu, 6 Jul 2017 12:14:14 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D8421C04D28B Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D8421C04D28B Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20170706152304.GA10584@infradead.org> References: <20170706152304.GA10584@infradead.org> <149935261019.29744.8564287571048506851.stgit@warthog.procyon.org.uk> <149935262759.29744.6299062653432480230.stgit@warthog.procyon.org.uk> To: Christoph Hellwig Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, torvalds@linux-foundation.org, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] afs: Add metadata xattrs MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31933.1499357651.1@warthog.procyon.org.uk> Date: Thu, 06 Jul 2017 17:14:11 +0100 Message-ID: <31934.1499357651@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 06 Jul 2017 16:14:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 838 Lines: 28 Christoph Hellwig wrote: > NAK. Don't overload xattrs with magic behavior just to avoid the need > to do proper syscalls or ioctls. How? This has to work on non-files, files you can't open and mountpoints. You can't do an ioctl() on a file opened O_PATH: if (unlikely(f->f_flags & O_PATH)) { f->f_mode = FMODE_PATH; f->f_op = &empty_fops; return 0; } and you can't specify AT_NO_AUTOMOUNT or AT_NO_FOLLOW to openat(), so ioctl() is of no use here. Do you advocate introducing a pioctl() call? Linus was dead-set against that as I recall. I could invent a bunch of AFS-specific syscalls, but I'd rather not do that or I suppose bring my fsinfo() patches up to scratch - but you didn't like those either. Note that using xattrs for fs info is not without precedent in Linux - cifs, for example. David