Lines Matching full:we

23  *     We call into btrfs_reserve_data_bytes() for the user request bytes that
24 * they wish to write. We make this reservation and add it to
25 * space_info->bytes_may_use. We set EXTENT_DELALLOC on the inode io_tree
27 * make a real allocation if we are pre-allocating or doing O_DIRECT.
30 * At writepages()/prealloc/O_DIRECT time we will call into
31 * btrfs_reserve_extent() for some part or all of this range of bytes. We
35 * may allocate a smaller on disk extent than we previously reserved.
46 * This is the simplest case, we haven't completed our operation and we know
47 * how much we reserved, we can simply call
60 * We keep track of two things on a per inode bases
63 * This is the number of file extent items we'll need to handle all of the
64 * outstanding DELALLOC space we have in this inode. We limit the maximum
70 * This is essentially how many dirty bytes we have for this inode, so we
71 * can calculate the number of checksum items we would have to add in order
74 * We keep a per-inode block_rsv in order to make it easier to keep track of
75 * our reservation. We use btrfs_calculate_inode_block_rsv_size() to
76 * calculate the current theoretical maximum reservation we would need for the
77 * metadata for this inode. We call this and then adjust our reservation as
83 * ->outstanding_extents is used for keeping track of how many extents we will
97 * We must call this once we are done, as we hold our reservation for the
164 * Called if we need to clear a data reservation for this inode
168 * which we can't sleep and is sure it won't affect qgroup reserved space.
183 * Called if we need to clear a data reservation for this inode
206 * @inode: the inode we need to release from
208 * meta reservation needs to know if we are freeing qgroup
224 * Since we statically set the block_rsv->size we just want to say we in btrfs_inode_rsv_release()
225 * are releasing 0 bytes, and then we'll just get the reservation over in btrfs_inode_rsv_release()
317 * If we are a free space inode we need to not flush since we will be in in btrfs_delalloc_reserve_metadata()
318 * the middle of a transaction commit. We also don't need the delalloc in btrfs_delalloc_reserve_metadata()
319 * mutex since we won't race with anybody. We need this mostly to make in btrfs_delalloc_reserve_metadata()
322 * If we have a transaction open (can happen if we call truncate_block in btrfs_delalloc_reserve_metadata()
323 * from truncate), then we need FLUSH_LIMIT so we don't deadlock. in btrfs_delalloc_reserve_metadata()
336 * We always want to do it this way, every other way is wrong and ends in btrfs_delalloc_reserve_metadata()
337 * in tears. Pre-reserving the amount we are going to add will always in btrfs_delalloc_reserve_metadata()
338 * be the right way, because otherwise if we have enough parallelism we in btrfs_delalloc_reserve_metadata()
342 * everything out and try again, which is bad. This way we just in btrfs_delalloc_reserve_metadata()
343 * over-reserve slightly, and clean up the mess when we are done. in btrfs_delalloc_reserve_metadata()
359 * Now we need to update our outstanding extents and csum bytes _first_ in btrfs_delalloc_reserve_metadata()
362 * needs to free the reservation we just made. in btrfs_delalloc_reserve_metadata()
372 /* Now we can safely add our space to our block rsv */ in btrfs_delalloc_reserve_metadata()
388 * @num_bytes: the number of bytes we are releasing.
392 * once we complete IO for a given set of bytes to release their metadata
417 * @num_bytes: the number of bytes we originally reserved with
419 * When we reserve space we increase outstanding_extents for the extents we may
420 * add. Once we've set the range as delalloc or created our ordered extents we
421 * have outstanding_extents to track the real usage, so we use this to free our
445 * @inode: inode we're writing to
446 * @start: start range we are writing to
447 * @len: how long the range we are writing to
487 * @inode: inode we're releasing space for