Lines Matching full:we

25  *     We call into btrfs_reserve_data_bytes() for the user request bytes that
26 * they wish to write. We make this reservation and add it to
27 * space_info->bytes_may_use. We set EXTENT_DELALLOC on the inode io_tree
29 * make a real allocation if we are pre-allocating or doing O_DIRECT.
32 * At writepages()/prealloc/O_DIRECT time we will call into
33 * btrfs_reserve_extent() for some part or all of this range of bytes. We
37 * may allocate a smaller on disk extent than we previously reserved.
48 * This is the simplest case, we haven't completed our operation and we know
49 * how much we reserved, we can simply call
62 * We keep track of two things on a per inode bases
65 * This is the number of file extent items we'll need to handle all of the
66 * outstanding DELALLOC space we have in this inode. We limit the maximum
72 * This is essentially how many dirty bytes we have for this inode, so we
73 * can calculate the number of checksum items we would have to add in order
76 * We keep a per-inode block_rsv in order to make it easier to keep track of
77 * our reservation. We use btrfs_calculate_inode_block_rsv_size() to
78 * calculate the current theoretical maximum reservation we would need for the
79 * metadata for this inode. We call this and then adjust our reservation as
85 * ->outstanding_extents is used for keeping track of how many extents we will
99 * We must call this once we are done, as we hold our reservation for the
166 * Called if we need to clear a data reservation for this inode
170 * which we can't sleep and is sure it won't affect qgroup reserved space.
185 * Called if we need to clear a data reservation for this inode
208 * @inode: the inode we need to release from
210 * meta reservation needs to know if we are freeing qgroup
226 * Since we statically set the block_rsv->size we just want to say we in btrfs_inode_rsv_release()
227 * are releasing 0 bytes, and then we'll just get the reservation over in btrfs_inode_rsv_release()
319 * If we are a free space inode we need to not flush since we will be in in btrfs_delalloc_reserve_metadata()
320 * the middle of a transaction commit. We also don't need the delalloc in btrfs_delalloc_reserve_metadata()
321 * mutex since we won't race with anybody. We need this mostly to make in btrfs_delalloc_reserve_metadata()
324 * If we have a transaction open (can happen if we call truncate_block in btrfs_delalloc_reserve_metadata()
325 * from truncate), then we need FLUSH_LIMIT so we don't deadlock. in btrfs_delalloc_reserve_metadata()
338 * We always want to do it this way, every other way is wrong and ends in btrfs_delalloc_reserve_metadata()
339 * in tears. Pre-reserving the amount we are going to add will always in btrfs_delalloc_reserve_metadata()
340 * be the right way, because otherwise if we have enough parallelism we in btrfs_delalloc_reserve_metadata()
344 * everything out and try again, which is bad. This way we just in btrfs_delalloc_reserve_metadata()
345 * over-reserve slightly, and clean up the mess when we are done. in btrfs_delalloc_reserve_metadata()
360 * Now we need to update our outstanding extents and csum bytes _first_ in btrfs_delalloc_reserve_metadata()
363 * needs to free the reservation we just made. in btrfs_delalloc_reserve_metadata()
373 /* Now we can safely add our space to our block rsv */ in btrfs_delalloc_reserve_metadata()
389 * @num_bytes: the number of bytes we are releasing.
393 * once we complete IO for a given set of bytes to release their metadata
418 * @num_bytes: the number of bytes we originally reserved with
420 * When we reserve space we increase outstanding_extents for the extents we may
421 * add. Once we've set the range as delalloc or created our ordered extents we
422 * have outstanding_extents to track the real usage, so we use this to free our
446 * @inode: inode we're writing to
447 * @start: start range we are writing to
448 * @len: how long the range we are writing to
488 * @inode: inode we're releasing space for