Lines Matching defs:base_ni

264  * @base_ni:		base ntfs inode
270 * Load the extent mft record @mref and attach it to its base inode @base_ni.
286 errno_t ntfs_extent_mft_record_map_ext(ntfs_inode *base_ni, MFT_REF mref,
303 (unsigned long long)base_ni->mft_no);
309 lck_mtx_lock(&base_ni->extent_lock);
310 if (base_ni->nr_extents > 0) {
311 extent_nis = base_ni->extent_nis;
312 for (i = 0; i < base_ni->nr_extents; i++) {
320 lck_mtx_unlock(&base_ni->extent_lock);
333 ntfs_error(base_ni->vol->mp, "Found stale extent mft "
339 ntfs_error(base_ni->vol->mp, "Failed to map extent mft "
344 err = ntfs_extent_inode_get(base_ni, mref, &ni);
346 lck_mtx_unlock(&base_ni->extent_lock);
352 lck_mtx_unlock(&base_ni->extent_lock);
360 ntfs_error(base_ni->vol->mp, "Found stale extent mft "
376 if ((base_ni->nr_extents + 1) * sizeof(ntfs_inode *) >
377 base_ni->extent_alloc) {
381 new_size = base_ni->extent_alloc + 4 * sizeof(ntfs_inode *);
384 ntfs_error(base_ni->vol->mp, "Failed to allocate "
390 if (base_ni->extent_alloc) {
391 if (base_ni->nr_extents > 0)
392 memcpy(tmp, base_ni->extent_nis,
393 base_ni->nr_extents *
395 OSFree(base_ni->extent_nis, base_ni->extent_alloc,
398 base_ni->extent_alloc = new_size;
399 base_ni->extent_nis = tmp;
401 base_ni->extent_nis[base_ni->nr_extents++] = ni;
402 lck_mtx_unlock(&base_ni->extent_lock);
409 lck_mtx_unlock(&base_ni->extent_lock);
619 * @base_ni: open base inode if allocating an extent mft record or NULL
625 * If @base_ni is NULL start the search at the default allocator position.
627 * If @base_ni is not NULL start the search at the mft record after the base
628 * mft record @base_ni.
637 ntfs_inode *base_ni, s64 *mft_no)
667 if (!base_ni)
670 data_pos = base_ni->mft_no + 1;
1941 * @base_ni: [IN] base inode (@va == NULL) or parent directory (@va != NULL)
1956 * case @va are the vnode attributes as given to us by the caller, @base_ni is
1978 * allocated and opened ntfs inode to the base inode @base_ni. @cn is NULL.
1992 * optimize this we start scanning at the place specified by @base_ni or if
1993 * @base_ni is NULL we start where we last stopped and we perform wrap around
2053 struct componentname *cn, ntfs_inode *base_ni,
2072 (unsigned long long)base_ni->mft_no);
2075 if (!base_ni)
2076 panic("%s(): !base_ni\n", __FUNCTION__);
2108 va ? NULL : base_ni, &bit);
2535 m->base_mft_record = MK_LE_MREF(base_ni->mft_no,
2536 base_ni->seq_no);
2551 * attach it to the base inode @base_ni and map its, i.e. the
2569 err = ntfs_extent_mft_record_map_ext(base_ni, MK_MREF(bit,
2589 file_attrs = base_ni->file_attributes & (FILE_ATTR_ENCRYPTED |
2865 err = ntfs_inode_add_vnode(ni, FALSE, base_ni->vn, cn);
3036 * @base_ni: base ntfs inode to which the extent inode to be freed belongs
3041 * to the base ntfs inode @base_ni.
3057 errno_t ntfs_extent_mft_record_free(ntfs_inode *base_ni, ntfs_inode *ni,
3069 (unsigned long long)base_ni->mft_no);
3074 if (base_ni->nr_extents <= 0)
3075 panic("%s(): base_ni->nr_extents <= 0\n", __FUNCTION__);
3076 lck_mtx_lock(&base_ni->extent_lock);
3078 extent_nis = base_ni->extent_nis;
3080 for (i = 0; i < base_ni->nr_extents; i++) {
3084 base_ni->nr_extents--;
3085 if (base_ni->nr_extents > 0) {
3094 (base_ni->nr_extents - i) *
3097 if (base_ni->nr_extents < 0)
3098 panic("%s(): base_ni->nr_extents < 0\n",
3100 OSFree(base_ni->extent_nis, base_ni->extent_alloc,
3102 base_ni->extent_alloc = 0;
3107 lck_mtx_unlock(&base_ni->extent_lock);
3112 (unsigned long long)base_ni->mft_no);