Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1298822rwl; Fri, 4 Nov 2022 12:10:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48tXrKxcLyXApTdSnrMw2ymljPGN41SYAL+q1rAYy4/1BJlMlrEcigkK1EDuANADA2rRfG X-Received: by 2002:a63:4710:0:b0:46f:fe10:8e20 with SMTP id u16-20020a634710000000b0046ffe108e20mr15336669pga.400.1667589029970; Fri, 04 Nov 2022 12:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667589029; cv=none; d=google.com; s=arc-20160816; b=Szv7ugZEcM9zKDZuTltLwWGZE9l2zmrFimKAJx1wcO+unnNglUTq/17MNfuRkWmFmj /lcHeCbEx0iaD/3jTkEICEWrBdS8Oax18misQP1F4Oyb2IGMMKpugBwUp30l5JT437H2 5txMD1uY9d9ibHn5s3on4IunwZfyQ+OV9XYOQzLhJZojkBuqHKTeBCcyDR9iWDZd7dIq aon2C99A9Y1XEHcP9mrYAdcDzqIVLQuM5qdtbFNr5pweMeKys2MFUlFT8Ye1wk5+ZDpE KidASEnPL3WJlISRrWhFCiqwo11lXRpVM3LzRMoBbb8j/4lSAAijgzQBAokgYULt10Z7 7UVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=lJfsTHY6tba7ZQacb0L0SXoAUwbrxp/Y0LpbDnploq0=; b=tKsdJ3kt8cSSSb1LYRaod68Iao2mq3OZtDM9BlXGQeL6s30oaKKZUPY52Ux3P+XJnd qw9Y/HUBorLQJ+h70FQPoPKGKfNkCy8fU99EKtno2kxItw2NeAy8HDbb1N5ptJKh2DTj lrCFORvD3NdjWwV/5PXkK+aylyrTkvfcPqLwY8iy4inzVHK86LHxiDRTbhXgDgbC75Ak fLsU6L94JCprQplhTGv4daKAfjapYeW+HVBM1I4frWbSdKHROVhhyNe9mpKeiIqqwr1b PChGu77yNYvld80+6JhbDJj6GMjrASWMaqRMvFV9UQIhvjsGZ3w+UlYHDXEEYMqjugAU syCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=idV9rW6C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dw7-20020a056a00368700b005251aec9b1esi5603767pfb.225.2022.11.04.12.10.16; Fri, 04 Nov 2022 12:10:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=idV9rW6C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbiKDSsf (ORCPT + 96 others); Fri, 4 Nov 2022 14:48:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbiKDSs1 (ORCPT ); Fri, 4 Nov 2022 14:48:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5761C5986D for ; Fri, 4 Nov 2022 11:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667587651; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lJfsTHY6tba7ZQacb0L0SXoAUwbrxp/Y0LpbDnploq0=; b=idV9rW6CSHyNQjO1kwUXSDKZtyNXUOVNX8ew5tKCqy8MAkGjEj3llSj6N6MBdFIApzPcjy 0+CFruAMmBVeBaDIY6o79leYALqG51fXq8ZZpND/2zxC+tLcgRAXGUN8zhYLYo7/l6IQ+G YSSR7P1N3Rm9g40LiSX/Bhb0J6qoYtY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-575-zAFmLBlFNrCWx9rm7prL4w-1; Fri, 04 Nov 2022 14:47:27 -0400 X-MC-Unique: zAFmLBlFNrCWx9rm7prL4w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73AEC185A78F; Fri, 4 Nov 2022 18:47:26 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.37.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD547400EA89; Fri, 4 Nov 2022 18:47:24 +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: <67142.1666978314@warthog.procyon.org.uk> References: <67142.1666978314@warthog.procyon.org.uk> <1762414.1665761217@warthog.procyon.org.uk> <1415915.1666274636@warthog.procyon.org.uk> To: Al Viro Cc: dhowells@redhat.com, Christoph Hellwig , willy@infradead.org, dchinner@redhat.com, Steve French , Shyam Prasad N , Rohith Surabattula , Jeff Layton , Ira Weiny , torvalds@linux-foundation.org, linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, jlayton@redhat.com Subject: Re: How to convert I/O iterators to iterators, sglists and RDMA lists MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1014263.1667587643.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Nov 2022 18:47:23 +0000 Message-ID: <1014264.1667587643@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Howells wrote: > > What protects pages involved in ITER_XARRAY iterator created by > > afs_read_dir()? Note that we are not guaranteed inode_lock() on > > the directory in question... > = > Yeah - that needs fixing. The size of the data can change, but I don't = update > the iterator. Actually, no. The iterator is the output buffer for afs_fetch_data(). If= the buffer turned out to be too small we drop the validate_lock and go round a= nd try again. req->actual_len and req->file_size are updated by afs_fetch_data() from th= e RPC reply. req->len tells the RPC delivery code how big the buffer is (wh= ich we don't have to fill if there's less data available than we have buffer space). David