summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2012-08-23 15:37:59 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2012-09-24 10:47:20 +0100
commit9e733d3923fb0e4eeae7b827019332d246576a22 (patch)
tree37fc39212545c6bc3c2de8f0293cb9952802f1e8 /fs/gfs2/incore.h
parent137834a696fd51ef8c710a0ad854b585027c7df0 (diff)
downloadlinux-9e733d3923fb0e4eeae7b827019332d246576a22.tar.gz
linux-9e733d3923fb0e4eeae7b827019332d246576a22.tar.bz2
linux-9e733d3923fb0e4eeae7b827019332d246576a22.zip
GFS2: Improve block reservation tracing
This patch improves the tracing of block reservations by removing some corner cases and also providing more useful detail in the traces. A new field is added to the reservation structure to contain the inode number. This is used since in certain contexts it is not possible to access the inode itself to obtain this information. As a result we can then display the inode number for all tracepoints and also in case we dump the resource group. The "del" tracepoint operation has been removed. This could be called with the reservation rgrp set to NULL. That resulted in not printing the device number, and thus making the information largely useless anyway. Also, the conditional on the rgrp being NULL can then be removed from the tracepoint. After this change, all the block reservation tracepoint calls will be called with the rgrp information. The existing ins,clm and tdel calls to the block reservation tracepoint are sufficient to track the entire life of the block reservation. In gfs2_block_alloc() the error detection is updated to print out the inode number of the problematic inode. This can then be compared against the information in the glock dump,tracepoints, etc. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 99d7c64b5091..6aaa07c7c731 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -268,13 +268,11 @@ struct gfs2_blkreserv {
/* components used during write (step 1): */
atomic_t rs_sizehint; /* hint of the write size */
- /* components used during get_local_rgrp (step 3): */
- struct gfs2_rbm rs_rbm;
struct gfs2_holder rs_rgd_gh; /* Filled in by get_local_rgrp */
struct rb_node rs_node; /* link to other block reservations */
-
- /* components used during block searches and assignments (step 4): */
+ struct gfs2_rbm rs_rbm; /* Start of reservation */
u32 rs_free; /* how many blocks are still free */
+ u64 rs_inum; /* Inode number for reservation */
/* ancillary quota stuff */
struct gfs2_quota_data *rs_qa_qd[2 * MAXQUOTAS];