All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -rc2] btrfs: remove stale code after removing ordered operations
@ 2014-08-20 15:03 David Sterba
  2014-08-20 15:09 ` Chris Mason
  0 siblings, 1 reply; 3+ messages in thread
From: David Sterba @ 2014-08-20 15:03 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

The commit "btrfs: disable strict file flushes for renames and
truncates" (8d875f95da43c6a8f18f77869f2ef26e9594fecc) left some unused
code and defines.

Signed-off-by: David Sterba <dsterba@suse.cz>
---

This is a cleanup after a 3.17-rc1 patch.

 fs/btrfs/btrfs_inode.h |  8 --------
 fs/btrfs/ctree.h       |  7 -------
 fs/btrfs/inode.c       | 10 ----------
 3 files changed, 25 deletions(-)

diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 43527fd78825..ee9d37d4f883 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -25,14 +25,6 @@
 #include "ordered-data.h"
 #include "delayed-inode.h"
 
-/*
- * ordered_data_close is set by truncate when a file that used
- * to have good data has been truncated to zero.  When it is set
- * the btrfs file release call will add this inode to the
- * ordered operations list so that we make sure to flush out any
- * new data the application may have written before commit.
- */
-#define BTRFS_INODE_ORDERED_DATA_CLOSE		0
 #define BTRFS_INODE_ORPHAN_META_RESERVED	1
 #define BTRFS_INODE_DUMMY			2
 #define BTRFS_INODE_IN_DEFRAG			3
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 8e29b614fe93..69cd3262193e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -62,13 +62,6 @@ struct btrfs_ordered_sum;
 
 #define BTRFS_COMPAT_EXTENT_TREE_V0
 
-/*
- * files bigger than this get some pre-flushing when they are added
- * to the ordered operations list.  That way we limit the total
- * work done by the commit
- */
-#define BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT (8 * 1024 * 1024)
-
 /* holds pointers to all of the tree roots */
 #define BTRFS_ROOT_TREE_OBJECTID 1ULL
 
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 03708ef3deef..ded36a4e47a8 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4545,16 +4545,6 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
 		ret = btrfs_update_inode(trans, root, inode);
 		btrfs_end_transaction(trans, root);
 	} else {
-
-		/*
-		 * We're truncating a file that used to have good data down to
-		 * zero. Make sure it gets into the ordered flush list so that
-		 * any new writes get down to disk quickly.
-		 */
-		if (newsize == 0)
-			set_bit(BTRFS_INODE_ORDERED_DATA_CLOSE,
-				&BTRFS_I(inode)->runtime_flags);
-
 		/*
 		 * 1 for the orphan item we're going to add
 		 * 1 for the orphan item deletion.
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -rc2] btrfs: remove stale code after removing ordered operations
  2014-08-20 15:03 [PATCH -rc2] btrfs: remove stale code after removing ordered operations David Sterba
@ 2014-08-20 15:09 ` Chris Mason
  2014-08-20 15:34   ` [PATCH] btrfs: remove stale define " David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Mason @ 2014-08-20 15:09 UTC (permalink / raw)
  To: David Sterba, linux-btrfs

On 08/20/2014 11:03 AM, David Sterba wrote:
> The commit "btrfs: disable strict file flushes for renames and
> truncates" (8d875f95da43c6a8f18f77869f2ef26e9594fecc) left some unused
> code and defines.

See my followup for the perf regression, we still need these.  I was
never able to trigger the enospc problem with xfstests here, but I did
double check that we're flushing or not properly now.

-chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] btrfs: remove stale define after removing ordered operations
  2014-08-20 15:09 ` Chris Mason
@ 2014-08-20 15:34   ` David Sterba
  0 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2014-08-20 15:34 UTC (permalink / raw)
  To: linux-btrfs; +Cc: clm, David Sterba

Last user removed in commit "btrfs: disable strict file flushes for
renames and truncates" (8d875f95da43c6a8f18f77869f2ef26e9594fecc).

Signed-off-by: David Sterba <dsterba@suse.cz>
---

 fs/btrfs/ctree.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 8e29b614fe93..69cd3262193e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -62,13 +62,6 @@ struct btrfs_ordered_sum;
 
 #define BTRFS_COMPAT_EXTENT_TREE_V0
 
-/*
- * files bigger than this get some pre-flushing when they are added
- * to the ordered operations list.  That way we limit the total
- * work done by the commit
- */
-#define BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT (8 * 1024 * 1024)
-
 /* holds pointers to all of the tree roots */
 #define BTRFS_ROOT_TREE_OBJECTID 1ULL
 
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-20 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 15:03 [PATCH -rc2] btrfs: remove stale code after removing ordered operations David Sterba
2014-08-20 15:09 ` Chris Mason
2014-08-20 15:34   ` [PATCH] btrfs: remove stale define " David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.