From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2403C4338F for ; Mon, 26 Jul 2021 09:44:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAE3B60F42 for ; Mon, 26 Jul 2021 09:44:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232882AbhGZJEX (ORCPT ); Mon, 26 Jul 2021 05:04:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23338 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbhGZJEX (ORCPT ); Mon, 26 Jul 2021 05:04:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627292690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kBC7/7n7ieIR+PQocFWGsdEhjsiqMRhY14cESzBGes0=; b=AS9h2lnV6opB1buD6SIjKiqKGnIwsB7DPJViOSV9dCJa9fBXg3B2YnwCz4cW6t2NHf9Yxf pjbV8NaCd4hwl/tYWqAyEIdc9ZycwF/SIC8eM345JJIfV+VUhHS3rarSm3Vzj4FMVg6sJH rhmwzLpCGttTcm1AqdBYScEVvlh2fIo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-454-brLp6B6MMoKsBE9RNfYfwA-1; Mon, 26 Jul 2021 05:44:47 -0400 X-MC-Unique: brLp6B6MMoKsBE9RNfYfwA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A966F8799EF; Mon, 26 Jul 2021 09:44:44 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.22.16.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id 61BB85C1D1; Mon, 26 Jul 2021 09:44:36 +0000 (UTC) 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: <35ecb577315f486f1636b2316c2051ad004f6f7b.camel@redhat.com> References: <35ecb577315f486f1636b2316c2051ad004f6f7b.camel@redhat.com> <162687506932.276387.14456718890524355509.stgit@warthog.procyon.org.uk> <162687508008.276387.6418924257569297305.stgit@warthog.procyon.org.uk> To: Jeff Layton Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, "Matthew Wilcox (Oracle)" , Anna Schumaker , Steve French , Dominique Martinet , Mike Marshall , David Wysochanski , Shyam Prasad N , Miklos Szeredi , Linus Torvalds , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, devel@lists.orangefs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 01/12] afs: Sort out symlink reading MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <812199.1627292675.1@warthog.procyon.org.uk> Date: Mon, 26 Jul 2021 10:44:35 +0100 Message-ID: <812200.1627292675@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Jeff Layton wrote: > > -static int afs_symlink_readpage(struct page *page) > > +static int afs_symlink_readpage(struct file *file, struct page *page) > > { > > struct afs_vnode *vnode = AFS_FS_I(page->mapping->host); > > struct afs_read *fsreq; > > > I wonder...would you be better served here by not using page_readlink > for symlinks and instead use simple_get_link and roll your own readlink > operation. It seems a bit more direct, and AFS seems to be the only > caller of page_readlink. Maybe. At some point it will need to go through netfs_readpage() so that it will get cached and maybe encrypted. Possibly there should be a netfs_readlink(). AFS directories too will at some point need to go through netfs_readahead() or similar. David