• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/ntfs/

Lines Matching refs:base_ni

228  * @base_ni:	base ntfs inode
232 * Load the extent mft record @mref and attach it to its base inode @base_ni.
239 MFT_RECORD *map_extent_mft_record(ntfs_inode *base_ni, MFT_REF mref,
251 mft_no, base_ni->mft_no);
253 atomic_inc(&base_ni->count);
259 mutex_lock(&base_ni->extent_lock);
260 if (base_ni->nr_extents > 0) {
261 extent_nis = base_ni->ext.extent_ntfs_inos;
262 for (i = 0; i < base_ni->nr_extents; i++) {
272 mutex_unlock(&base_ni->extent_lock);
273 atomic_dec(&base_ni->count);
286 ntfs_error(base_ni->vol->sb, "Found stale extent mft "
292 ntfs_error(base_ni->vol->sb, "Failed to map extent "
297 ni = ntfs_new_extent_inode(base_ni->vol->sb, mft_no);
299 mutex_unlock(&base_ni->extent_lock);
300 atomic_dec(&base_ni->count);
303 ni->vol = base_ni->vol;
306 ni->ext.base_ntfs_ino = base_ni;
310 mutex_unlock(&base_ni->extent_lock);
311 atomic_dec(&base_ni->count);
317 ntfs_error(base_ni->vol->sb, "Found stale extent mft "
324 if (!(base_ni->nr_extents & 3)) {
326 int new_size = (base_ni->nr_extents + 4) * sizeof(ntfs_inode *);
330 ntfs_error(base_ni->vol->sb, "Failed to allocate "
336 if (base_ni->nr_extents) {
337 BUG_ON(!base_ni->ext.extent_ntfs_inos);
338 memcpy(tmp, base_ni->ext.extent_ntfs_inos, new_size -
340 kfree(base_ni->ext.extent_ntfs_inos);
342 base_ni->ext.extent_ntfs_inos = tmp;
344 base_ni->ext.extent_ntfs_inos[base_ni->nr_extents++] = ni;
345 mutex_unlock(&base_ni->extent_lock);
346 atomic_dec(&base_ni->count);
352 mutex_unlock(&base_ni->extent_lock);
353 atomic_dec(&base_ni->count);
391 ntfs_inode *base_ni;
399 base_ni = ni;
401 base_ni = ni->ext.base_ntfs_ino;
403 __mark_inode_dirty(VFS_I(base_ni), I_DIRTY_SYNC | I_DIRTY_DATASYNC);
1109 * @base_ni: open base inode if allocating an extent mft record or NULL
1114 * If @base_ni is NULL start the search at the default allocator position.
1116 * If @base_ni is not NULL start the search at the mft record after the base
1117 * mft record @base_ni.
1126 ntfs_inode *base_ni)
1153 if (!base_ni)
1156 data_pos = base_ni->mft_no + 1;
2151 * @base_ni: [IN] open base inode if allocating an extent mft record or NULL
2156 * If @base_ni is NULL make the mft record a base mft record, i.e. a file or
2162 * If @base_ni is not NULL make the allocated mft record an extent record,
2164 * the allocated and opened ntfs inode to the base inode @base_ni. In this
2177 * optimize this we start scanning at the place specified by @base_ni or if
2178 * @base_ni is NULL we start where we last stopped and we perform wrap around
2238 ntfs_inode *base_ni, MFT_RECORD **mrec)
2254 if (base_ni) {
2257 (long long)base_ni->mft_no);
2258 /* @mode and @base_ni are mutually exclusive. */
2263 /* @mode and @base_ni are mutually exclusive. */
2264 BUG_ON(base_ni);
2273 bit = ntfs_mft_bitmap_find_and_alloc_free_rec_nolock(vol, base_ni);
2572 if (base_ni) {
2578 m->base_mft_record = MK_LE_MREF(base_ni->mft_no,
2579 base_ni->seq_no);
2582 * attach it to the base inode @base_ni and map, pin, and lock
2585 m = map_extent_mft_record(base_ni, bit, &ni);
2728 base_ni ? "extent " : "", (long long)bit);
2779 ntfs_inode *base_ni;
2789 base_ni = ni->ext.base_ntfs_ino;
2792 BUG_ON(base_ni->nr_extents <= 0);
2795 mft_no, base_ni->mft_no);
2797 mutex_lock(&base_ni->extent_lock);
2802 "not freeing.", base_ni->mft_no);
2803 mutex_unlock(&base_ni->extent_lock);
2808 extent_nis = base_ni->ext.extent_ntfs_inos;
2810 for (i = 0; i < base_ni->nr_extents; i++) {
2814 base_ni->nr_extents--;
2815 memmove(extent_nis, extent_nis + 1, (base_ni->nr_extents - i) *
2821 mutex_unlock(&base_ni->extent_lock);
2826 base_ni->mft_no);
2880 mutex_lock(&base_ni->extent_lock);
2881 extent_nis = base_ni->ext.extent_ntfs_inos;
2882 if (!(base_ni->nr_extents & 3)) {
2883 int new_size = (base_ni->nr_extents + 4) * sizeof(ntfs_inode*);
2889 mutex_unlock(&base_ni->extent_lock);
2893 if (base_ni->nr_extents) {
2894 BUG_ON(!base_ni->ext.extent_ntfs_inos);
2895 memcpy(extent_nis, base_ni->ext.extent_ntfs_inos,
2897 kfree(base_ni->ext.extent_ntfs_inos);
2899 base_ni->ext.extent_ntfs_inos = extent_nis;
2903 extent_nis[base_ni->nr_extents++] = ni;
2904 mutex_unlock(&base_ni->extent_lock);