diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2020-10-22 21:34:29 +0300 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-02-17 21:26:06 +0300 |
commit | 07974d2a2a98bc3ce15f3411ebe5175c0af8f1c3 (patch) | |
tree | d410e6f7fdb7fa8e4b9d20b9be0af15aabd26c0a /fs/gfs2/incore.h | |
parent | 0ec9b9ea4f83303bfd8f052a3d8b2bd179b002e1 (diff) | |
download | linux-07974d2a2a98bc3ce15f3411ebe5175c0af8f1c3.tar.xz |
gfs2: Rename rs_{free -> requested} and rd_{reserved -> requested}
We keep track of what we've so far been referring to as reservations in
rd_rstree: the nodes in that tree indicate where in a resource group we'd
like to allocate the next couple of blocks for a particular inode. Local
processes take those as hints, but they may still "steal" blocks from those
extents, so when actually allocating a block, we must double check in the
bitmap whether that block is actually still free. Likewise, other cluster
nodes may "steal" such blocks as well.
One of the following patches introduces resource group glock sharing, i.e.,
sharing of an exclusively locked resource group glock among local processes to
speed up allocations. To make that work, we'll need to keep track of how many
blocks we've actually reserved for each inode, so we end up with two different
kinds of reservations.
Distinguish these two kinds by referring to blocks which are reserved but may
still be "stolen" as "requested". This rename also makes it more obvious that
rs_requested and rd_requested are strongly related.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index cca806ff611c..0640d0c70a75 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -106,7 +106,7 @@ struct gfs2_rgrpd { u32 rd_data; /* num of data blocks in rgrp */ u32 rd_bitbytes; /* number of bytes in data bitmaps */ u32 rd_free; - u32 rd_reserved; /* number of blocks reserved */ + u32 rd_requested; /* number of blocks in rd_rstree */ u32 rd_free_clone; u32 rd_dinodes; u64 rd_igeneration; @@ -290,8 +290,8 @@ struct gfs2_qadata { /* quota allocation data */ struct gfs2_blkreserv { struct rb_node rs_node; /* node within rd_rstree */ struct gfs2_rgrpd *rs_rgd; - u64 rs_start; /* start of reservation */ - u32 rs_free; /* how many blocks are still free */ + u64 rs_start; + u32 rs_requested; }; /* |