X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext4%2Fmballoc.h;h=c7c9906c2a754dec0953412b1c0843873ef7f6b9;hb=ee26562772f47a6e2030a79b230226b204a410b6;hp=bfe6add46bcfdaa2988a449b2c6cd316c4802419;hpb=ccc751841567816532874afcaeb449dbf6ca7d3a;p=linux-2.6 diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index bfe6add46b..c7c9906c2a 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h @@ -164,11 +164,17 @@ struct ext4_free_extent { * Locality group: * we try to group all related changes together * so that writeback can flush/allocate them together as well + * Size of lg_prealloc_list hash is determined by MB_DEFAULT_GROUP_PREALLOC + * (512). We store prealloc space into the hash based on the pa_free blocks + * order value.ie, fls(pa_free)-1; */ +#define PREALLOC_TB_SIZE 10 struct ext4_locality_group { /* for allocator */ - struct mutex lg_mutex; /* to serialize allocates */ - struct list_head lg_prealloc_list;/* list of preallocations */ + /* to serialize allocates */ + struct mutex lg_mutex; + /* list of preallocations */ + struct list_head lg_prealloc_list[PREALLOC_TB_SIZE]; spinlock_t lg_prealloc_lock; };