When deleting an inode, keep track of the generation of the deleted inode in the inode glock Lock Value Block (LVB). When trying to delete an inode remotely, check the last-known inode generation against the deleted inode generation to skip duplicate remote deletes. This avoids taking the resource group glock in order to verify the block type.
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -171,6 +171,12 @@ struct gfs2_rindex { · 170 unmodified lines | |||
| 171 | #define GFS2_RGF_NOALLOC 0x00000008 | 171 | #define GFS2_RGF_NOALLOC 0x00000008 |
| 172 | #define GFS2_RGF_TRIMMED 0x00000010 | 172 | #define GFS2_RGF_TRIMMED 0x00000010 |
| 173 | 173 | ||
| 174 | struct gfs2_inode_lvb { | ||
| 175 | __be32 ri_magic; | ||
| 176 | __be32 __pad; | ||
| 177 | __be64 ri_generation_deleted; | ||
| 178 | }; | ||
| 179 | |||
| 174 | struct gfs2_rgrp_lvb { | 180 | struct gfs2_rgrp_lvb { |
| 175 | __be32 rl_magic; | 181 | __be32 rl_magic; |
| 176 | __be32 rl_flags; | 182 | __be32 rl_flags; |