Skip to contentSkip to conversation

GFS2: Clean up quota slot allocation

PATCH New Abhijith Das 1 participant 1 message Jan 14, 2014 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 GFS2: Clean up quota slot allocation

Quota slot allocation has historically used a vector of pages and a set of homegrown find/test/set/clear bit functions. Since the size of the bitmap is likely to be based on the default qc file size, thats a couple of pages at most. So we ought to be able to allocate that as a single chunk, with a vmalloc fallback, just in case of memory fragmentation.

We are then able to use the kernel's own find/test/set/clear bit functions, rather than rolling our own.

fs/gfs2/incore.h +1 -2
index 59d99ec..4b9aa5b 100644
@@ -733,8 +733,7 @@ struct gfs2_sbd {
 	spinlock_t sd_trunc_lock;
 
 	unsigned int sd_quota_slots;
-	unsigned int sd_quota_chunks;
-	unsigned char **sd_quota_bitmap;
+	unsigned long *sd_quota_bitmap;
 
 	u64 sd_quota_sync_gen;
 
fs/gfs2/quota.c +29 -71

162 lines not on this page · raw message

Signature · 1 line
1.8.3.1