Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1780763pxb; Thu, 4 Nov 2021 08:19:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHEMJEXcXK4uy5hyoxnSdHndEn8hYJd5gZr6Mv9LBFk4THxjb/4LFKxtz8og+p+fd4zJNg X-Received: by 2002:a05:6e02:8ad:: with SMTP id a13mr36840940ilt.136.1636039145004; Thu, 04 Nov 2021 08:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636039144; cv=none; d=google.com; s=arc-20160816; b=lNBaWruYRGdvI4DcbBovkw2niCbvp7cz7XLjuZ6P9DOmO5ktG4rwyCiVNd1nBrx5QH c9XPYUiIYqNTHU7Uc3HnfjmSX742YTznachzqU4FfhByJ2Svdda/z6Mb12iGG8WzRTp5 +4jOUgikIZD/NSM19ewNyFJDTIBSFyKk64ZFaZfbgJ4sQnkcFmumP7uEV5wpRSf6gYOP bwjLB97+0eiTGNBpN6cTMeYoo1QVowMzt8DdLJf7M+r8R9Vy8VKFFY9SGwz+oAXqbTik wmhbTM6k2TLIA2SvsBQxWrO+bpAzkQAgjU5DV25m9bETBUQMPouJyMJ4IhTGofCEmDaG 2edA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:organization:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=HwKjf7WHOX86SNs2/b/Tyq0nadJz8ke0RewmsmiZfRo=; b=APdhYh0EVb0/c7r1IJXQkTwzE6sKc5oUbCI3bs0efsn9a0vahKtHN1Lef6sQZTQFke zmksaYB63J/0+m5ImyFP3s+Z+ZioGeZYDpDZpOkhA1o+uwBoxjfBMPp7AvvH6mJgo2Un 07ZG5LDkE7EmyMQDol1/PsHEr9UvaQ1Lpr8RLXn115zhj1xib7YGzlHKVnNtjMiHnUxm uNqp8nVQOEMvjpChjD98GXCLL790HZbOH4aRw8Tt/qmSaBIm6whUpOoA1wn61f+p818O /C8yuhLc/QItUZ+aRQs63mHRRxw9URPBfpqJs94qpw5aziRTYMOTnbB7wVSXuZlroTKE XZow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@auristor.com header.s=MDaemon header.b="xFy6Qe/E"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=auristor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m41si10942527jav.114.2021.11.04.08.18.27; Thu, 04 Nov 2021 08:19:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@auristor.com header.s=MDaemon header.b="xFy6Qe/E"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=auristor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231265AbhKDPSJ (ORCPT + 99 others); Thu, 4 Nov 2021 11:18:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbhKDPSI (ORCPT ); Thu, 4 Nov 2021 11:18:08 -0400 Received: from sequoia-grove.ad.secure-endpoints.com (sequoia-grove.secure-endpoints.com [IPv6:2001:470:1f07:f77:70f5:c082:a96a:5685]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4B62C061714 for ; Thu, 4 Nov 2021 08:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/relaxed; d=auristor.com; s=MDaemon; r=y; t=1636038928; x=1636643728; i=jaltman@auristor.com; q=dns/txt; h=Message-ID:Date: MIME-Version:User-Agent:Subject:Content-Language:To:Cc: References:From:Organization:In-Reply-To:Content-Type; bh=HwKjf7 WHOX86SNs2/b/Tyq0nadJz8ke0RewmsmiZfRo=; b=xFy6Qe/E5PtpTSiBktrR0X HsObfvuryxU/GaG8yfzc2wEc3pWQNSv/9tJNOOBzlkUt7vclA/pJriWzu4t7cLR7 SKfVdxeJj9WWrIZ7WEU85w6JrJhhWw6jig5jr27HXVgZPUhesU9YrUA5DNJNTFBV gUwHS9aUxkNYmPT2D8WgQ= X-MDAV-Result: clean X-MDAV-Processed: sequoia-grove.ad.secure-endpoints.com, Thu, 04 Nov 2021 11:15:28 -0400 Received: by auristor.com (208.125.0.235) (MDaemon PRO v21.5.0) with ESMTPSA id md5001003025231.msg; Thu, 04 Nov 2021 11:15:28 -0400 X-Spam-Processed: sequoia-grove.ad.secure-endpoints.com, Thu, 04 Nov 2021 11:15:28 -0400 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 50.204.136.171 X-MDArrival-Date: Thu, 04 Nov 2021 11:15:28 -0400 X-MDOrigin-Country: US, NA X-Authenticated-Sender: jaltman@auristor.com X-Return-Path: prvs=194251a06c=jaltman@auristor.com X-Envelope-From: jaltman@auristor.com X-MDaemon-Deliver-To: linux-kernel@vger.kernel.org Message-ID: <9924e31b-9f31-bf81-7a10-c95b93e2999e@auristor.com> Date: Thu, 4 Nov 2021 08:15:25 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] afs: Fix ENOSPC, EDQUOT and other errors to fail a write rather than retrying Content-Language: en-US To: "Matthew Wilcox (willy@infradead.org)" , David Howells Cc: marc.dionne@auristor.com, linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Layton References: <163598300034.1327800.8060660349996331911.stgit@warthog.procyon.org.uk> From: Jeffrey E Altman Organization: AuriStor, Inc. In-Reply-To: Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="------------ms050106020304020807070302" X-MDCFSigsAdded: auristor.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a cryptographically signed message in MIME format. --------------ms050106020304020807070302 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 11/3/2021 8:22 PM, Matthew Wilcox (willy@infradead.org) wrote: > On Wed, Nov 03, 2021 at 11:43:20PM +0000, David Howells wrote: >> Currently, at the completion of a storage RPC from writepages, the errors >> ENOSPC, EDQUOT, ENOKEY, EACCES, EPERM, EKEYREJECTED and EKEYREVOKED cause >> the pages involved to be redirtied and the write to be retried by the VM at >> a future time. >> >> However, this is probably not the right thing to do, and, instead, the >> writes should be discarded so that the system doesn't get blocked (though >> unmounting will discard the uncommitted writes anyway). > umm. I'm not sure that throwing away the write is the best answer > for some of these errors. Our whole story around error handling in > filesystems, the page cache and the VFS is pretty sad, but I don't think > that this is the right approach. > > Ideally, we'd hold onto the writes in the page cache until (eg for ENOSPC > / EDQUOT), the user has deleted some files, then retry the writes. Hi Matthew, I agree that it would be desirable to avoid discarding user data but in practice that is hard to do.  The proposed behavior change is consistent with other Unix AFS/AuriStorFS cache manager implementations.   There are many situations which can result in an out of quota or out of space error where the end user has absolutely no ability to do anything about it. An EDQUOT error might occur because the AFS volume has reached its quota.  However, the writer only has insert privilege and cannot delete.  The user might not even be able to list the contents of the volume.    An ENOSPC error might be the result of the backing store for AFS vice partitions filling due to data being written to other AFS volumes that the writer has no ability to access or manage. AFS cache managers frequently implement write-on-close semantics and will flush dirty content to the fileserver only when the file is closed or the local cache is out-of-space.   Holding onto dirty data that cannot be flushed to the server on a multi-user timeshare system can result on unwanted negative impacts on other users of the system. Another risk is that if dirty data persists locally that the EDQUOT/ENOSPC errors will be replaced by EACCES or EPERM errors when the associated authentication credentials expire. If a back-off strategy is to be implemented in the future, AFS does provide RPCs that can be used to query the volume's online status, the maximum quota in one KiB blocks, the blocks in use, the available blocks in the partition, and the maximum number of blocks in the partition.   Querying RXAFS_GetVolumeStatus or RXYFS_GetVolumeStatus can avoid the overhead of issuing a StoreData operation that is likely to fail. Jeffrey Altman --------------ms050106020304020807070302 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC DGswggXSMIIEuqADAgECAhBAAW0B1qVVQ32wvx2EXYU6MA0GCSqGSIb3DQEBCwUAMDoxCzAJ BgNVBAYTAlVTMRIwEAYDVQQKEwlJZGVuVHJ1c3QxFzAVBgNVBAMTDlRydXN0SUQgQ0EgQTEy MB4XDTE5MDkwNTE0MzE0N1oXDTIyMTEwMTE0MzE0N1owcDEvMC0GCgmSJomT8ixkAQETH0Ew MTQxMEMwMDAwMDE2RDAxRDZBNTQwMDAwMDQ0NDcxGTAXBgNVBAMTEEplZmZyZXkgRSBBbHRt YW4xFTATBgNVBAoTDEF1cmlTdG9yIEluYzELMAkGA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEB AQUAA4IBDwAwggEKAoIBAQCY1TC9QeWnUgEoJ81FcAVnhGn/AWuzvkYRUG5/ZyXDdaM212e8 ybCklgSmZweqNdrfaaHXk9vwjpvpD4YWgb07nJ1QBwlvRV/VPAaDdneIygJJWBCzaMVLttKO 0VimH/I/HUwFBQT2mrktucCEf2qogdi2P+p5nuhnhIUiyZ71Fo43gF6cuXIMV/1rBNIJDuwM Q3H8zi6GL0p4mZFZDDKtbYq2l8+MNxFvMrYcLaJqejQNQRBuZVfv0Fq9pOGwNLAk19baIw3U xdwx+bGpTtS63Py1/57MQ0W/ZXE/Ocnt1qoDLpJeZIuEBKgMcn5/iN9+Ro5zAuOBEKg34wBS 8QCTAgMBAAGjggKcMIICmDAOBgNVHQ8BAf8E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