Re: [Cluster-devel] [PATCH 5/5] gfs2_edit: Fix unaligned accesses due to saved_metablock size

2017-01-12 Thread Bob Peterson
- Original Message - | Each saved block is prefixed by a saved_metablock structure that holds | its block number and data length. Unfortunately this structure is 10 | bytes in size, which means that storing the metadata header in memory | immediately following it causes accesses to the

Re: [Cluster-devel] [PATCH 4/5] gfs2_edit: Fix unaligned access in restore_init()

2017-01-12 Thread Bob Peterson
- Original Message - | Scanning this buffer byte-by-byte using casts results in a quick bus | error on sparc64. Avoid this by using a memcpy. This function only runs | once at the beginning of a restoremeta and in most cases the loop will | only execute once so this adds very little

Re: [Cluster-devel] [PATCH 2/5] gfs2_edit savemeta: Don't read rgrp blocks twice

2017-01-12 Thread Bob Peterson
- Original Message - | When savemeta iterates over the rgrps and saves the rgrp header blocks | it calls save_block which does a bread() for each block despite them | already being read in earlier. Instead, call save_bh() on the existing | rgrp buffers. This isn't likely to give a

Re: [Cluster-devel] [PATCH 1/5] gfs2_edit savemeta: Factor out the bh saving code

2017-01-12 Thread Bob Peterson
- Original Message - | save_block() accepts a block number, reads it and saves it, which makes | it tricky to save an already-read block without reading it a second | time. Split out the bh saving part of save_block() into save_bh() to | make things more flexible. | | Also switch the

Re: [Cluster-devel] [PATCH 3/5] gfs2_edit savemeta: Follow lf_next

2017-01-12 Thread Bob Peterson
- Original Message - | Previously, gfs2_edit savemeta did not walk down the lf_next chain to | save the directory leaf blocks that might be there. Add a | save_leaf_chain() function that does that. | | Related: rhbz#1382087 | | Signed-off-by: Andrew Price | --- Hi,