From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Wed, 25 Jul 2018 15:05:36 -0400 (EDT) Subject: [Cluster-devel] [PATCH] gfs2: Special-case rindex for gfs2_grow In-Reply-To: <20180725185955.8207-1-agruenba@redhat.com> References: <20180725185955.8207-1-agruenba@redhat.com> Message-ID: <990954492.54306840.1532545536791.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- > To speed up the common case of appending to a file, > gfs2_write_alloc_required presumes that writing beyond the end of a file > will always require additional blocks to be allocated. This assumption > is incorrect for preallocates files, but there are no negative > consequences as long as *some* space is still left on the filesystem. > > One special file that always has some space preallocated beyond the end > of the file is the rindex: when growing a filesystem, gfs2_grow adds one > or more new resource groups and appends records describing those > resource groups to the rindex; the preallocated space ensures that this > is always possible. > > However, when a filesystem is completely full, gfs2_write_alloc_required > will indicate that an additional allocation is required, and appending > the next record to the rindex will fail even though space for that > record has already been preallocated. To fix that, skip the incorrect > optimization in gfs2_write_alloc_required, but for the rindex only. > Other writes to preallocated space beyond the end of the file are still > allowed to fail on completely full filesystems. > > Signed-off-by: Andreas Gruenbacher Hi, ACK. Yeah, we need this. Bob Peterson