summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 1a4bd193962c..2027bbd4b05e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -455,7 +455,7 @@ again:
455 455
456 /* 456 /*
457 * skip compression for a small file range(<=blocksize) that 457 * skip compression for a small file range(<=blocksize) that
458 * isn't an inline extent, since it dosen't save disk space at all. 458 * isn't an inline extent, since it doesn't save disk space at all.
459 */ 459 */
460 if (total_compressed <= blocksize && 460 if (total_compressed <= blocksize &&
461 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size)) 461 (start > 0 || end + 1 < BTRFS_I(inode)->disk_i_size))
@@ -3705,7 +3705,7 @@ cache_index:
3705 * and doesn't have an inode ref with the name "bar" anymore. 3705 * and doesn't have an inode ref with the name "bar" anymore.
3706 * 3706 *
3707 * Setting last_unlink_trans to last_trans is a pessimistic approach, 3707 * Setting last_unlink_trans to last_trans is a pessimistic approach,
3708 * but it guarantees correctness at the expense of ocassional full 3708 * but it guarantees correctness at the expense of occasional full
3709 * transaction commits on fsync if our inode is a directory, or if our 3709 * transaction commits on fsync if our inode is a directory, or if our
3710 * inode is not a directory, logging its parent unnecessarily. 3710 * inode is not a directory, logging its parent unnecessarily.
3711 */ 3711 */
@@ -4961,7 +4961,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
4961 * be instantly completed which will give us extents that need 4961 * be instantly completed which will give us extents that need
4962 * to be truncated. If we fail to get an orphan inode down we 4962 * to be truncated. If we fail to get an orphan inode down we
4963 * could have left over extents that were never meant to live, 4963 * could have left over extents that were never meant to live,
4964 * so we need to garuntee from this point on that everything 4964 * so we need to guarantee from this point on that everything
4965 * will be consistent. 4965 * will be consistent.
4966 */ 4966 */
4967 ret = btrfs_orphan_add(trans, inode); 4967 ret = btrfs_orphan_add(trans, inode);
@@ -5231,7 +5231,7 @@ void btrfs_evict_inode(struct inode *inode)
5231 } 5231 }
5232 5232
5233 /* 5233 /*
5234 * We can't just steal from the global reserve, we need tomake 5234 * We can't just steal from the global reserve, we need to make
5235 * sure there is room to do it, if not we need to commit and try 5235 * sure there is room to do it, if not we need to commit and try
5236 * again. 5236 * again.
5237 */ 5237 */
@@ -7407,7 +7407,7 @@ static int lock_extent_direct(struct inode *inode, u64 lockstart, u64 lockend,
7407 cached_state); 7407 cached_state);
7408 /* 7408 /*
7409 * We're concerned with the entire range that we're going to be 7409 * We're concerned with the entire range that we're going to be
7410 * doing DIO to, so we need to make sure theres no ordered 7410 * doing DIO to, so we need to make sure there's no ordered
7411 * extents in this range. 7411 * extents in this range.
7412 */ 7412 */
7413 ordered = btrfs_lookup_ordered_range(inode, lockstart, 7413 ordered = btrfs_lookup_ordered_range(inode, lockstart,
@@ -7569,7 +7569,7 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock,
7569 if (current->journal_info) { 7569 if (current->journal_info) {
7570 /* 7570 /*
7571 * Need to pull our outstanding extents and set journal_info to NULL so 7571 * Need to pull our outstanding extents and set journal_info to NULL so
7572 * that anything that needs to check if there's a transction doesn't get 7572 * that anything that needs to check if there's a transaction doesn't get
7573 * confused. 7573 * confused.
7574 */ 7574 */
7575 dio_data = current->journal_info; 7575 dio_data = current->journal_info;
@@ -7602,7 +7602,7 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock,
7602 * decompress it, so there will be buffering required no matter what we 7602 * decompress it, so there will be buffering required no matter what we
7603 * do, so go ahead and fallback to buffered. 7603 * do, so go ahead and fallback to buffered.
7604 * 7604 *
7605 * We return -ENOTBLK because thats what makes DIO go ahead and go back 7605 * We return -ENOTBLK because that's what makes DIO go ahead and go back
7606 * to buffered IO. Don't blame me, this is the price we pay for using 7606 * to buffered IO. Don't blame me, this is the price we pay for using
7607 * the generic code. 7607 * the generic code.
7608 */ 7608 */
@@ -9018,7 +9018,7 @@ static int btrfs_truncate(struct inode *inode)
9018 return ret; 9018 return ret;
9019 9019
9020 /* 9020 /*
9021 * Yes ladies and gentelment, this is indeed ugly. The fact is we have 9021 * Yes ladies and gentlemen, this is indeed ugly. The fact is we have
9022 * 3 things going on here 9022 * 3 things going on here
9023 * 9023 *
9024 * 1) We need to reserve space for our orphan item and the space to 9024 * 1) We need to reserve space for our orphan item and the space to
@@ -9032,15 +9032,15 @@ static int btrfs_truncate(struct inode *inode)
9032 * space reserved in case it uses space during the truncate (thank you 9032 * space reserved in case it uses space during the truncate (thank you
9033 * very much snapshotting). 9033 * very much snapshotting).
9034 * 9034 *
9035 * And we need these to all be seperate. The fact is we can use alot of 9035 * And we need these to all be separate. The fact is we can use a lot of
9036 * space doing the truncate, and we have no earthly idea how much space 9036 * space doing the truncate, and we have no earthly idea how much space
9037 * we will use, so we need the truncate reservation to be seperate so it 9037 * we will use, so we need the truncate reservation to be separate so it
9038 * doesn't end up using space reserved for updating the inode or 9038 * doesn't end up using space reserved for updating the inode or
9039 * removing the orphan item. We also need to be able to stop the 9039 * removing the orphan item. We also need to be able to stop the
9040 * transaction and start a new one, which means we need to be able to 9040 * transaction and start a new one, which means we need to be able to
9041 * update the inode several times, and we have no idea of knowing how 9041 * update the inode several times, and we have no idea of knowing how
9042 * many times that will be, so we can't just reserve 1 item for the 9042 * many times that will be, so we can't just reserve 1 item for the
9043 * entirety of the opration, so that has to be done seperately as well. 9043 * entirety of the operation, so that has to be done separately as well.
9044 * Then there is the orphan item, which does indeed need to be held on 9044 * Then there is the orphan item, which does indeed need to be held on
9045 * to for the whole operation, and we need nobody to touch this reserved 9045 * to for the whole operation, and we need nobody to touch this reserved
9046 * space except the orphan code. 9046 * space except the orphan code.