Lines Matching refs:attr_b

414 	struct ATTRIB *attr = NULL, *attr_b;  in attr_set_size()  local
427 attr_b = ni_find_attr(ni, NULL, &le_b, type, name, name_len, NULL, in attr_set_size()
429 if (!attr_b) { in attr_set_size()
434 if (!attr_b->non_res) { in attr_set_size()
435 err = attr_set_size_res(ni, attr_b, le_b, mi_b, new_size, run, in attr_set_size()
436 &attr_b); in attr_set_size()
441 if (!attr_b->non_res) { in attr_set_size()
450 is_ext = is_attr_ext(attr_b); in attr_set_size()
453 align <<= attr_b->nres.c_unit; in attr_set_size()
455 old_valid = le64_to_cpu(attr_b->nres.valid_size); in attr_set_size()
456 old_size = le64_to_cpu(attr_b->nres.data_size); in attr_set_size()
457 old_alloc = le64_to_cpu(attr_b->nres.alloc_size); in attr_set_size()
466 attr_b->nres.data_size = cpu_to_le64(new_size); in attr_set_size()
473 svcn = le64_to_cpu(attr_b->nres.svcn); in attr_set_size()
474 evcn = le64_to_cpu(attr_b->nres.evcn); in attr_set_size()
477 attr = attr_b; in attr_set_size()
485 attr = ni_find_attr(ni, attr_b, &le, type, name, name_len, &vcn, in attr_set_size()
512 attr_b->nres.data_size = cpu_to_le64(new_size); in attr_set_size()
602 attr_b->nres.alloc_size = cpu_to_le64(new_alloc_tmp); in attr_set_size()
607 attr_b->nres.data_size = cpu_to_le64(new_size); in attr_set_size()
615 attr_b->nres.data_size = attr_b->nres.alloc_size; in attr_set_size()
625 attr_b->nres.data_size = attr_b->nres.alloc_size; in attr_set_size()
627 attr_b->nres.valid_size = attr_b->nres.data_size; in attr_set_size()
656 attr_b->flags, &attr, &mi, NULL); in attr_set_size()
663 attr_b = ni_find_attr(ni, NULL, &le_b, type, name, name_len, in attr_set_size()
665 if (!attr_b) { in attr_set_size()
688 attr_b->nres.valid_size = attr_b->nres.data_size = in attr_set_size()
689 attr_b->nres.alloc_size = cpu_to_le64(old_size); in attr_set_size()
735 attr_b->nres.alloc_size = cpu_to_le64(new_alloc_tmp); in attr_set_size()
738 attr_b->nres.data_size = cpu_to_le64(new_size); in attr_set_size()
740 attr_b->nres.valid_size = in attr_set_size()
741 attr_b->nres.data_size; in attr_set_size()
744 le64_to_cpu(attr_b->nres.data_size)) in attr_set_size()
745 attr_b->nres.data_size = in attr_set_size()
746 attr_b->nres.alloc_size; in attr_set_size()
748 le64_to_cpu(attr_b->nres.valid_size)) in attr_set_size()
749 attr_b->nres.valid_size = in attr_set_size()
750 attr_b->nres.alloc_size; in attr_set_size()
761 le64_sub_cpu(&attr_b->nres.total_size, in attr_set_size()
774 attr = attr_b; in attr_set_size()
803 if (attr_b->nres.valid_size != valid) { in attr_set_size()
804 attr_b->nres.valid_size = valid; in attr_set_size()
811 *ret = attr_b; in attr_set_size()
816 if (attr_b->non_res) { in attr_set_size()
817 new_alloc = le64_to_cpu(attr_b->nres.alloc_size); in attr_set_size()
835 attr_b->nres.data_size = cpu_to_le64(old_size); in attr_set_size()
836 attr_b->nres.valid_size = cpu_to_le64(old_valid); in attr_set_size()
837 attr_b->nres.alloc_size = cpu_to_le64(old_alloc); in attr_set_size()
843 if (le64_to_cpu(attr_b->nres.svcn) <= svcn && in attr_set_size()
844 svcn <= le64_to_cpu(attr_b->nres.evcn)) { in attr_set_size()
845 attr = attr_b; in attr_set_size()
853 attr = ni_find_attr(ni, attr_b, &le, type, name, name_len, in attr_set_size()
893 struct ATTRIB *attr, *attr_b; in attr_data_get_block() local
933 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, &mi_b); in attr_data_get_block()
934 if (!attr_b) { in attr_data_get_block()
939 if (!attr_b->non_res) { in attr_data_get_block()
945 asize = le64_to_cpu(attr_b->nres.alloc_size) >> cluster_bits; in attr_data_get_block()
956 svcn = le64_to_cpu(attr_b->nres.svcn); in attr_data_get_block()
957 evcn1 = le64_to_cpu(attr_b->nres.evcn) + 1; in attr_data_get_block()
959 attr = attr_b; in attr_data_get_block()
964 attr = ni_find_attr(ni, attr_b, &le, ATTR_DATA, NULL, 0, &vcn, in attr_data_get_block()
1006 if (!is_attr_ext(attr_b)) { in attr_data_get_block()
1018 if (attr_b->nres.c_unit) { in attr_data_get_block()
1019 CLST clst_per_frame = 1u << attr_b->nres.c_unit; in attr_data_get_block()
1032 attr = ni_find_attr(ni, attr_b, &le, ATTR_DATA, NULL, 0, in attr_data_get_block()
1073 total_size0 = le64_to_cpu(attr_b->nres.total_size); in attr_data_get_block()
1097 attr_b->nres.total_size = cpu_to_le64(total_size); in attr_data_get_block()
1119 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, in attr_data_get_block()
1121 if (!attr_b) { in attr_data_get_block()
1126 attr = attr_b; in attr_data_get_block()
1158 alloc = bytes_to_cluster(sbi, le64_to_cpu(attr_b->nres.alloc_size)); in attr_data_get_block()
1214 attr_b->flags, &attr, &mi, NULL); in attr_data_get_block()
1232 attr_b->nres.total_size = cpu_to_le64(total_size0); in attr_data_get_block()
1644 struct ATTRIB *attr = NULL, *attr_b; in attr_allocate_frame() local
1652 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, &mi_b); in attr_allocate_frame()
1653 if (!attr_b) in attr_allocate_frame()
1656 if (!is_attr_ext(attr_b)) in attr_allocate_frame()
1660 total_size = le64_to_cpu(attr_b->nres.total_size); in attr_allocate_frame()
1662 svcn = le64_to_cpu(attr_b->nres.svcn); in attr_allocate_frame()
1663 evcn1 = le64_to_cpu(attr_b->nres.evcn) + 1; in attr_allocate_frame()
1664 data_size = le64_to_cpu(attr_b->nres.data_size); in attr_allocate_frame()
1667 attr = attr_b; in attr_allocate_frame()
1675 attr = ni_find_attr(ni, attr_b, &le, ATTR_DATA, NULL, 0, &vcn, in attr_allocate_frame()
1689 err = attr_is_frame_compressed(ni, attr_b, frame, &clst_data); in attr_allocate_frame()
1740 attr_b->nres.total_size = cpu_to_le64(total_size); in attr_allocate_frame()
1762 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, in attr_allocate_frame()
1764 if (!attr_b) { in attr_allocate_frame()
1769 attr = attr_b; in attr_allocate_frame()
1783 sbi, le64_to_cpu(attr_b->nres.alloc_size)); in attr_allocate_frame()
1841 attr_b->flags, &attr, &mi, NULL); in attr_allocate_frame()
1848 if (attr_b) { in attr_allocate_frame()
1852 valid_size = le64_to_cpu(attr_b->nres.valid_size); in attr_allocate_frame()
1854 attr_b->nres.valid_size = cpu_to_le64(valid_size); in attr_allocate_frame()
1870 struct ATTRIB *attr = NULL, *attr_b; in attr_collapse_range() local
1883 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, &mi_b); in attr_collapse_range()
1884 if (!attr_b) in attr_collapse_range()
1887 if (!attr_b->non_res) { in attr_collapse_range()
1892 data_size = le64_to_cpu(attr_b->nres.data_size); in attr_collapse_range()
1893 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_collapse_range()
1894 a_flags = attr_b->flags; in attr_collapse_range()
1896 if (is_attr_ext(attr_b)) { in attr_collapse_range()
1897 total_size = le64_to_cpu(attr_b->nres.total_size); in attr_collapse_range()
1898 mask = (sbi->cluster_size << attr_b->nres.c_unit) - 1; in attr_collapse_range()
1937 svcn = le64_to_cpu(attr_b->nres.svcn); in attr_collapse_range()
1938 evcn1 = le64_to_cpu(attr_b->nres.evcn) + 1; in attr_collapse_range()
1941 attr = attr_b; in attr_collapse_range()
1949 attr = ni_find_attr(ni, attr_b, &le, ATTR_DATA, NULL, 0, &vcn, in attr_collapse_range()
2013 attr_b = NULL; in attr_collapse_range()
2078 if (!attr_b) { in attr_collapse_range()
2080 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, in attr_collapse_range()
2082 if (!attr_b) { in attr_collapse_range()
2095 attr_b->nres.alloc_size = cpu_to_le64(alloc_size - bytes); in attr_collapse_range()
2096 attr_b->nres.data_size = cpu_to_le64(data_size); in attr_collapse_range()
2097 attr_b->nres.valid_size = cpu_to_le64(min(valid_size, data_size)); in attr_collapse_range()
2099 if (is_attr_ext(attr_b)) in attr_collapse_range()
2100 attr_b->nres.total_size = cpu_to_le64(total_size); in attr_collapse_range()
2128 struct ATTRIB *attr = NULL, *attr_b; in attr_punch_hole() local
2141 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, &mi_b); in attr_punch_hole()
2142 if (!attr_b) in attr_punch_hole()
2145 if (!attr_b->non_res) { in attr_punch_hole()
2146 u32 data_size = le32_to_cpu(attr_b->res.data_size); in attr_punch_hole()
2154 memset(Add2Ptr(resident_data(attr_b), from), 0, to - from); in attr_punch_hole()
2158 if (!is_attr_ext(attr_b)) in attr_punch_hole()
2161 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_punch_hole()
2162 total_size = le64_to_cpu(attr_b->nres.total_size); in attr_punch_hole()
2169 mask = (sbi->cluster_size << attr_b->nres.c_unit) - 1; in attr_punch_hole()
2199 svcn = le64_to_cpu(attr_b->nres.svcn); in attr_punch_hole()
2200 evcn1 = le64_to_cpu(attr_b->nres.evcn) + 1; in attr_punch_hole()
2201 a_flags = attr_b->flags; in attr_punch_hole()
2204 attr = attr_b; in attr_punch_hole()
2212 attr = ni_find_attr(ni, attr_b, &le, ATTR_DATA, NULL, 0, &vcn, in attr_punch_hole()
2271 attr_b = NULL; in attr_punch_hole()
2299 if (!attr_b) { in attr_punch_hole()
2300 attr_b = ni_find_attr(ni, NULL, NULL, ATTR_DATA, NULL, 0, NULL, in attr_punch_hole()
2302 if (!attr_b) { in attr_punch_hole()
2309 attr_b->nres.total_size = cpu_to_le64(total_size); in attr_punch_hole()
2346 struct ATTRIB *attr = NULL, *attr_b; in attr_insert_range() local
2358 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, &mi_b); in attr_insert_range()
2359 if (!attr_b) in attr_insert_range()
2362 if (!is_attr_ext(attr_b)) { in attr_insert_range()
2367 if (!attr_b->non_res) { in attr_insert_range()
2368 data_size = le32_to_cpu(attr_b->res.data_size); in attr_insert_range()
2372 data_size = le64_to_cpu(attr_b->nres.data_size); in attr_insert_range()
2373 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_insert_range()
2374 mask = (sbi->cluster_size << attr_b->nres.c_unit) - 1; in attr_insert_range()
2399 if (!attr_b->non_res) { in attr_insert_range()
2404 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, in attr_insert_range()
2406 if (!attr_b) { in attr_insert_range()
2414 if (!attr_b->non_res) { in attr_insert_range()
2416 char *data = Add2Ptr(attr_b, in attr_insert_range()
2417 le16_to_cpu(attr_b->res.data_off)); in attr_insert_range()
2425 data_size = le64_to_cpu(attr_b->nres.data_size); in attr_insert_range()
2426 alloc_size = le64_to_cpu(attr_b->nres.alloc_size); in attr_insert_range()
2432 a_flags = attr_b->flags; in attr_insert_range()
2433 svcn = le64_to_cpu(attr_b->nres.svcn); in attr_insert_range()
2434 evcn1 = le64_to_cpu(attr_b->nres.evcn) + 1; in attr_insert_range()
2437 attr = attr_b; in attr_insert_range()
2445 attr = ni_find_attr(ni, attr_b, &le, ATTR_DATA, NULL, 0, &vcn, in attr_insert_range()
2490 attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL, 0, NULL, in attr_insert_range()
2492 if (!attr_b) { in attr_insert_range()
2509 attr_b->nres.data_size = cpu_to_le64(data_size + bytes); in attr_insert_range()
2510 attr_b->nres.alloc_size = cpu_to_le64(alloc_size + bytes); in attr_insert_range()
2514 attr_b->nres.valid_size = attr_b->nres.data_size; in attr_insert_range()
2516 attr_b->nres.valid_size = cpu_to_le64(ni->i_valid); in attr_insert_range()
2536 svcn = le64_to_cpu(attr_b->nres.svcn); in attr_insert_range()
2537 evcn1 = le64_to_cpu(attr_b->nres.evcn) + 1; in attr_insert_range()
2540 attr = attr_b; in attr_insert_range()
2547 attr = ni_find_attr(ni, attr_b, &le, ATTR_DATA, NULL, 0, &vcn, in attr_insert_range()