From: Bob Peterson Date: Tue, 19 Dec 2017 14:45:57 -0500 (EST) Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Reduce code redundancy writing log headers In-Reply-To: <1530277346.743976.1513709759310.JavaMail.zimbra@redhat.com> References: <1530277346.743976.1513709759310.JavaMail.zimbra@redhat.com> Message-ID: <1966515013.755172.1513712757169.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 ----- | Hi, | | Before this patch, there was a lot of code redundancy between functions | log_write_header (which uses bio) and clean_journal (which uses | buffer_head). This patch reduces the redundancy to simplify the code | and make log header writing more consistent. We want more consistency | and reduced redundancy because we plan to add a bunch of new fields | to improve performance (by eliminating the local statfs and quota files) | improve metadata integrity (by adding new crcs and such) and for better | debugging (by adding new fields to track when and where metadata was | pushed through the journals.) We don't want to duplicate setting these | new fields, nor allow for human error in the process. | | This reduction in code redundancy is accomplished by introducing a new | helper function, gfs2_write_log_header which uses bio rather than bh. | That accomplishes three things: (1) It simplifies recovery function | clean_journal() to use the new helper function and iomap rather than | redundancy and block_map (and eventually we can maybe remove block_map). | (2) It adds new error checking of the bio request, if told to wait for | IO completion. (3) It reduces the dependency on buffer_heads. | | Signed-off-by: Bob Peterson | --- Hi, Self-NACK. I found a bug during testing, so I'll need to rework this. Bob Peterson