suballoc.c (e3b4a97dbe9741a3227c3ed857a0632532fcd386) suballoc.c (33d5d380d667ad264675cfdb297dfc3c5b6542cc)
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * suballoc.c
5 *
6 * metadata alloc and free
7 * Inspired by ext3 block groups.
8 *

--- 741 unchanged lines hidden (view full) ---

750 if (slot != OCFS2_INVALID_SLOT &&
751 atomic_read(&osb->s_num_meta_stolen) < OCFS2_MAX_TO_STEAL)
752 goto extent_steal;
753
754 atomic_set(&osb->s_num_meta_stolen, 0);
755 status = ocfs2_reserve_suballoc_bits(osb, (*ac),
756 EXTENT_ALLOC_SYSTEM_INODE,
757 (u32)osb->slot_num, NULL,
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * suballoc.c
5 *
6 * metadata alloc and free
7 * Inspired by ext3 block groups.
8 *

--- 741 unchanged lines hidden (view full) ---

750 if (slot != OCFS2_INVALID_SLOT &&
751 atomic_read(&osb->s_num_meta_stolen) < OCFS2_MAX_TO_STEAL)
752 goto extent_steal;
753
754 atomic_set(&osb->s_num_meta_stolen, 0);
755 status = ocfs2_reserve_suballoc_bits(osb, (*ac),
756 EXTENT_ALLOC_SYSTEM_INODE,
757 (u32)osb->slot_num, NULL,
758 ALLOC_NEW_GROUP);
758 ALLOC_GROUPS_FROM_GLOBAL|ALLOC_NEW_GROUP);
759
760
761 if (status >= 0) {
762 status = 0;
763 if (slot != OCFS2_INVALID_SLOT)
764 ocfs2_init_meta_steal_slot(osb);
765 goto bail;
766 } else if (status < 0 && status != -ENOSPC) {

--- 1099 unchanged lines hidden (view full) ---

1866 mlog_entry_void();
1867
1868 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);
1869
1870 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL
1871 && ac->ac_which != OCFS2_AC_USE_MAIN);
1872
1873 if (ac->ac_which == OCFS2_AC_USE_LOCAL) {
759
760
761 if (status >= 0) {
762 status = 0;
763 if (slot != OCFS2_INVALID_SLOT)
764 ocfs2_init_meta_steal_slot(osb);
765 goto bail;
766 } else if (status < 0 && status != -ENOSPC) {

--- 1099 unchanged lines hidden (view full) ---

1866 mlog_entry_void();
1867
1868 BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);
1869
1870 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL
1871 && ac->ac_which != OCFS2_AC_USE_MAIN);
1872
1873 if (ac->ac_which == OCFS2_AC_USE_LOCAL) {
1874 WARN_ON(min_clusters > 1);
1875
1874 status = ocfs2_claim_local_alloc_bits(osb,
1875 handle,
1876 ac,
1877 bits_wanted,
1878 cluster_start,
1879 num_clusters);
1880 if (!status)
1881 atomic_inc(&osb->alloc_stats.local_data);

--- 574 unchanged lines hidden ---
1876 status = ocfs2_claim_local_alloc_bits(osb,
1877 handle,
1878 ac,
1879 bits_wanted,
1880 cluster_start,
1881 num_clusters);
1882 if (!status)
1883 atomic_inc(&osb->alloc_stats.local_data);

--- 574 unchanged lines hidden ---