Lines Matching refs:mft_ni
1279 ntfs_inode *mft_ni, *mftbmp_ni; in ntfs_mft_bitmap_extend_allocation_nolock() local
1294 mft_ni = NTFS_I(vol->mft_ino); in ntfs_mft_bitmap_extend_allocation_nolock()
1383 mrec = map_mft_record(mft_ni); in ntfs_mft_bitmap_extend_allocation_nolock()
1389 ctx = ntfs_attr_get_search_ctx(mft_ni, mrec); in ntfs_mft_bitmap_extend_allocation_nolock()
1488 unmap_mft_record(mft_ni); in ntfs_mft_bitmap_extend_allocation_nolock()
1503 unmap_mft_record(mft_ni); in ntfs_mft_bitmap_extend_allocation_nolock()
1553 unmap_mft_record(mft_ni); in ntfs_mft_bitmap_extend_allocation_nolock()
1577 ntfs_inode *mft_ni, *mftbmp_ni; in ntfs_mft_bitmap_extend_initialized_nolock() local
1584 mft_ni = NTFS_I(vol->mft_ino); in ntfs_mft_bitmap_extend_initialized_nolock()
1588 mrec = map_mft_record(mft_ni); in ntfs_mft_bitmap_extend_initialized_nolock()
1593 ctx = ntfs_attr_get_search_ctx(mft_ni, mrec); in ntfs_mft_bitmap_extend_initialized_nolock()
1630 unmap_mft_record(mft_ni); in ntfs_mft_bitmap_extend_initialized_nolock()
1640 mrec = map_mft_record(mft_ni); in ntfs_mft_bitmap_extend_initialized_nolock()
1646 ctx = ntfs_attr_get_search_ctx(mft_ni, mrec); in ntfs_mft_bitmap_extend_initialized_nolock()
1660 unmap_mft_record(mft_ni); in ntfs_mft_bitmap_extend_initialized_nolock()
1676 unmap_mft_record(mft_ni); in ntfs_mft_bitmap_extend_initialized_nolock()
1715 ntfs_inode *mft_ni; in ntfs_mft_data_extend_allocation_nolock() local
1725 mft_ni = NTFS_I(vol->mft_ino); in ntfs_mft_data_extend_allocation_nolock()
1731 down_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
1732 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1733 ll = mft_ni->allocated_size; in ntfs_mft_data_extend_allocation_nolock()
1734 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1735 rl = ntfs_attr_find_vcn_nolock(mft_ni, in ntfs_mft_data_extend_allocation_nolock()
1738 up_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
1758 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1759 ll = mft_ni->allocated_size; in ntfs_mft_data_extend_allocation_nolock()
1760 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1769 up_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
1785 up_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
1797 rl = ntfs_runlists_merge(mft_ni->runlist.rl, rl2); in ntfs_mft_data_extend_allocation_nolock()
1799 up_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
1810 mft_ni->runlist.rl = rl; in ntfs_mft_data_extend_allocation_nolock()
1816 mrec = map_mft_record(mft_ni); in ntfs_mft_data_extend_allocation_nolock()
1822 ctx = ntfs_attr_get_search_ctx(mft_ni, mrec); in ntfs_mft_data_extend_allocation_nolock()
1828 ret = ntfs_attr_lookup(mft_ni->type, mft_ni->name, mft_ni->name_len, in ntfs_mft_data_extend_allocation_nolock()
1840 for (rl2 = rl; rl2 > mft_ni->runlist.rl; rl2--) { in ntfs_mft_data_extend_allocation_nolock()
1908 ret = ntfs_attr_lookup(mft_ni->type, mft_ni->name, in ntfs_mft_data_extend_allocation_nolock()
1909 mft_ni->name_len, CASE_SENSITIVE, 0, NULL, 0, in ntfs_mft_data_extend_allocation_nolock()
1918 write_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1919 mft_ni->allocated_size += nr << vol->cluster_size_bits; in ntfs_mft_data_extend_allocation_nolock()
1921 cpu_to_sle64(mft_ni->allocated_size); in ntfs_mft_data_extend_allocation_nolock()
1922 write_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1927 unmap_mft_record(mft_ni); in ntfs_mft_data_extend_allocation_nolock()
1928 up_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
1933 if (ntfs_attr_lookup(mft_ni->type, mft_ni->name, mft_ni->name_len, in ntfs_mft_data_extend_allocation_nolock()
1937 write_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1938 mft_ni->allocated_size += nr << vol->cluster_size_bits; in ntfs_mft_data_extend_allocation_nolock()
1939 write_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_data_extend_allocation_nolock()
1941 unmap_mft_record(mft_ni); in ntfs_mft_data_extend_allocation_nolock()
1942 up_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
1953 if (ntfs_cluster_free(mft_ni, old_last_vcn, -1, ctx) < 0) { in ntfs_mft_data_extend_allocation_nolock()
1959 if (ntfs_rl_truncate_nolock(vol, &mft_ni->runlist, old_last_vcn)) { in ntfs_mft_data_extend_allocation_nolock()
1989 unmap_mft_record(mft_ni); in ntfs_mft_data_extend_allocation_nolock()
1990 up_write(&mft_ni->runlist.lock); in ntfs_mft_data_extend_allocation_nolock()
2245 ntfs_inode *mft_ni, *mftbmp_ni, *ni; in ntfs_mft_record_alloc() local
2271 mft_ni = NTFS_I(vol->mft_ino); in ntfs_mft_record_alloc()
2292 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2293 ll = mft_ni->initialized_size >> vol->mft_record_size_bits; in ntfs_mft_record_alloc()
2294 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2384 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2385 old_data_initialized = mft_ni->initialized_size; in ntfs_mft_record_alloc()
2386 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2398 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2402 (long long)mft_ni->allocated_size, in ntfs_mft_record_alloc()
2404 (long long)mft_ni->initialized_size); in ntfs_mft_record_alloc()
2405 while (ll > mft_ni->allocated_size) { in ntfs_mft_record_alloc()
2406 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2413 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2417 (long long)mft_ni->allocated_size, in ntfs_mft_record_alloc()
2419 (long long)mft_ni->initialized_size); in ntfs_mft_record_alloc()
2421 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2429 write_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2430 old_data_initialized = mft_ni->initialized_size; in ntfs_mft_record_alloc()
2432 while (ll > mft_ni->initialized_size) { in ntfs_mft_record_alloc()
2435 new_initialized_size = mft_ni->initialized_size + in ntfs_mft_record_alloc()
2437 mft_no = mft_ni->initialized_size >> vol->mft_record_size_bits; in ntfs_mft_record_alloc()
2440 write_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2448 write_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2449 mft_ni->initialized_size = new_initialized_size; in ntfs_mft_record_alloc()
2451 write_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2454 m = map_mft_record(mft_ni); in ntfs_mft_record_alloc()
2460 ctx = ntfs_attr_get_search_ctx(mft_ni, m); in ntfs_mft_record_alloc()
2464 unmap_mft_record(mft_ni); in ntfs_mft_record_alloc()
2467 err = ntfs_attr_lookup(mft_ni->type, mft_ni->name, mft_ni->name_len, in ntfs_mft_record_alloc()
2473 unmap_mft_record(mft_ni); in ntfs_mft_record_alloc()
2477 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2479 cpu_to_sle64(mft_ni->initialized_size); in ntfs_mft_record_alloc()
2482 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2487 unmap_mft_record(mft_ni); in ntfs_mft_record_alloc()
2488 read_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2492 (long long)mft_ni->allocated_size, in ntfs_mft_record_alloc()
2494 (long long)mft_ni->initialized_size); in ntfs_mft_record_alloc()
2495 BUG_ON(i_size_read(vol->mft_ino) > mft_ni->allocated_size); in ntfs_mft_record_alloc()
2496 BUG_ON(mft_ni->initialized_size > i_size_read(vol->mft_ino)); in ntfs_mft_record_alloc()
2497 read_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2730 write_lock_irqsave(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()
2731 mft_ni->initialized_size = old_data_initialized; in ntfs_mft_record_alloc()
2733 write_unlock_irqrestore(&mft_ni->size_lock, flags); in ntfs_mft_record_alloc()