Searched refs:wnd (Results 1 – 5 of 5) sorted by relevance
/fs/ntfs3/ |
D | bitmap.c | 35 static int wnd_rescan(struct wnd_bitmap *wnd); 36 static struct buffer_head *wnd_map(struct wnd_bitmap *wnd, size_t iw); 37 static bool wnd_is_free_hlp(struct wnd_bitmap *wnd, size_t bit, size_t bits); 123 void wnd_close(struct wnd_bitmap *wnd) in wnd_close() argument 127 kfree(wnd->free_bits); in wnd_close() 128 run_close(&wnd->run); in wnd_close() 130 node = rb_first(&wnd->start_tree); in wnd_close() 134 rb_erase(node, &wnd->start_tree); in wnd_close() 230 static void wnd_add_free_ext(struct wnd_bitmap *wnd, size_t bit, size_t len, in wnd_add_free_ext() argument 239 if (wnd->count >= NTFS_MAX_WND_EXTENTS && in wnd_add_free_ext() [all …]
|
D | fsntfs.c | 364 struct wnd_bitmap *wnd = &sbi->used.bitmap; in ntfs_look_for_free_space() local 366 down_write_nested(&wnd->rw_lock, BITMAP_MUTEX_CLUSTERS); in ntfs_look_for_free_space() 368 zlen = wnd_zone_len(wnd); in ntfs_look_for_free_space() 375 zlen = wnd_zone_len(wnd); in ntfs_look_for_free_space() 384 lcn = wnd_zone_bit(wnd); in ntfs_look_for_free_space() 387 wnd_zone_set(wnd, lcn + alen, zlen - alen); in ntfs_look_for_free_space() 389 err = wnd_set_used(wnd, lcn, alen); in ntfs_look_for_free_space() 403 if (lcn >= wnd->nbits) in ntfs_look_for_free_space() 406 alen = wnd_find(wnd, len, lcn, BITMAP_FIND_MARK_AS_USED, &alcn); in ntfs_look_for_free_space() 411 zlen = wnd_zone_len(wnd); in ntfs_look_for_free_space() [all …]
|
D | ntfs_fs.h | 822 void wnd_close(struct wnd_bitmap *wnd); 823 static inline size_t wnd_zeroes(const struct wnd_bitmap *wnd) in wnd_zeroes() argument 825 return wnd->total_zeroes; in wnd_zeroes() 827 int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits); 828 int wnd_set_free(struct wnd_bitmap *wnd, size_t bit, size_t bits); 829 int wnd_set_used(struct wnd_bitmap *wnd, size_t bit, size_t bits); 830 bool wnd_is_free(struct wnd_bitmap *wnd, size_t bit, size_t bits); 831 bool wnd_is_used(struct wnd_bitmap *wnd, size_t bit, size_t bits); 836 size_t wnd_find(struct wnd_bitmap *wnd, size_t to_alloc, size_t hint, 838 int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits); [all …]
|
D | run.c | 1058 struct wnd_bitmap *wnd; in run_unpack_ex() local 1071 wnd = &sbi->used.bitmap; in run_unpack_ex() 1087 down_read_nested(&wnd->rw_lock, BITMAP_MUTEX_CLUSTERS); in run_unpack_ex() 1089 ok = wnd_is_used(wnd, lcn, len); in run_unpack_ex() 1090 up_read(&wnd->rw_lock); in run_unpack_ex() 1097 if (down_write_trylock(&wnd->rw_lock)) { in run_unpack_ex() 1103 if (wnd_is_free(wnd, lcn + i, 1)) { in run_unpack_ex() 1108 err = wnd_set_used(wnd, lcn_f, len_f); in run_unpack_ex() 1116 err = wnd_set_used(wnd, lcn_f, len_f); in run_unpack_ex() 1118 up_write(&wnd->rw_lock); in run_unpack_ex()
|
D | super.c | 496 struct wnd_bitmap *wnd = &sbi->used.bitmap; in ntfs_statfs() local 500 buf->f_blocks = wnd->nbits; in ntfs_statfs() 502 buf->f_bfree = buf->f_bavail = wnd_zeroes(wnd); in ntfs_statfs()
|