Lines Matching refs:size
1210 int rc, size;
1215 size = sizeof(struct transaction_stats_s);
1216 s->stats = kmalloc(size, GFP_KERNEL);
1222 memcpy(s->stats, &journal->j_stats, size);
1271 /* Minimum size of descriptor tag */
1674 jbd2_debug(1, "JBD2: inode %s/%ld, size %lld, bits %d, blksize %ld\n",
2708 * sub-page-size chunks. (For example, 16k pages on Power systems
2710 * use a SLAB allocator. There are slab caches for each block size,
2736 static int jbd2_journal_create_slab(size_t size)
2739 int i = order_base_2(size) - 10;
2742 if (size == PAGE_SIZE)
2767 static struct kmem_cache *get_slab(size_t size)
2769 int i = order_base_2(size) - 10;
2778 void *jbd2_alloc(size_t size, gfp_t flags)
2782 BUG_ON(size & (size-1)); /* Must be a power of 2 */
2784 if (size < PAGE_SIZE)
2785 ptr = kmem_cache_alloc(get_slab(size), flags);
2787 ptr = (void *)__get_free_pages(flags, get_order(size));
2791 BUG_ON(((unsigned long) ptr) & (size-1));
2796 void jbd2_free(void *ptr, size_t size)
2798 if (size < PAGE_SIZE)
2799 kmem_cache_free(get_slab(size), ptr);
2801 free_pages((unsigned long)ptr, get_order(size));