[PATCH 24/27] btrfs: Convert to new freezing mechanism

2012-06-01 Thread Jan Kara
...@oracle.com Signed-off-by: Jan Kara j...@suse.cz --- fs/btrfs/disk-io.c |3 --- fs/btrfs/file.c|3 ++- fs/btrfs/inode.c |6 +- fs/btrfs/transaction.c |7 +++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk

[PATCH 00/27 v6] Fix filesystem freezing deadlocks

2012-06-01 Thread Jan Kara
Hello, here is the sixth iteration of my patches to improve filesystem freezing. The change since last iteration is that filesystem can be frozen with open but unlinked files. After some thinking, I've decided that the best way to handle this is to block removal inside -evict_inode() of each

[PATCH 00/19 v5] Fix filesystem freezing deadlocks

2012-04-16 Thread Jan Kara
Hello, here is the fifth iteration of my patches to improve filesystem freezing. No serious changes since last time. Mostly I rebased patches and merged this series with series moving file_update_time() to -page_mkwrite() to simplify testing and merging. Filesystem freezing is currently racy

Re: [PATCH 00/19 v5] Fix filesystem freezing deadlocks

2012-04-16 Thread Jan Kara
The subject should have been [PATCH 00/27]... Sorry for the mistake. Honza On Mon 16-04-12 18:13:38, Jan Kara wrote: Hello, here is the fifth iteration of my patches to improve filesystem freezing. No serious changes

[PATCH 24/27] btrfs: Convert to new freezing mechanism

2012-04-16 Thread Jan Kara
anything to do anyway). CC: linux-btrfs@vger.kernel.org CC: Chris Mason chris.ma...@oracle.com Signed-off-by: Jan Kara j...@suse.cz --- fs/btrfs/disk-io.c |3 --- fs/btrfs/file.c|3 ++- fs/btrfs/inode.c |6 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/btrfs

[PATCH 11/27] btrfs: Push mnt_want_write() outside of i_mutex

2012-04-16 Thread Jan Kara
When mnt_want_write() starts to handle freezing it will get a full lock semantics requiring proper lock ordering. So push mnt_want_write() call consistently outside of i_mutex. CC: Chris Mason chris.ma...@oracle.com CC: linux-btrfs@vger.kernel.org Signed-off-by: Jan Kara j...@suse.cz --- fs

[PATCH 04/19] btrfs: Push mnt_want_write() outside of i_mutex

2012-03-28 Thread Jan Kara
When mnt_want_write() starts to handle freezing it will get a full lock semantics requiring proper lock ordering. So push mnt_want_write() call consistently outside of i_mutex. CC: Chris Mason chris.ma...@oracle.com CC: linux-btrfs@vger.kernel.org Signed-off-by: Jan Kara j...@suse.cz --- fs

[PATCH 00/19 v4] Fix filesystem freezing deadlocks

2012-03-28 Thread Jan Kara
Hello, here is the fourth iteration of my patches to improve filesystem freezing. Filesystem freezing is currently racy and thus we can end up with dirty data on frozen filesystem (see changelog patch 06 for detailed race description). This patch series aims at fixing this. To be able to

[PATCH 17/19] btrfs: Convert to new freezing mechanism

2012-03-28 Thread Jan Kara
anything to do anyway). CC: linux-btrfs@vger.kernel.org CC: Chris Mason chris.ma...@oracle.com Signed-off-by: Jan Kara j...@suse.cz --- fs/btrfs/disk-io.c |3 --- fs/btrfs/file.c|3 ++- fs/btrfs/inode.c |6 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/btrfs

Re: ext3/4, btrfs, ocfs2: How to assure that cleancache_invalidate_fs is called on every superblock free

2012-03-12 Thread Jan Kara
to superblocks of every mounted cleancache-enabled filesystem [2] and it would be fatal if a superblock is free'd without cleancache being notified. Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line

Re: getdents - ext4 vs btrfs performance

2012-03-05 Thread Jan Kara
... Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 17/19] btrfs: Convert to new freezing mechanism

2012-03-05 Thread Jan Kara
anything to do anyway). CC: linux-btrfs@vger.kernel.org CC: Chris Mason chris.ma...@oracle.com Signed-off-by: Jan Kara j...@suse.cz --- fs/btrfs/disk-io.c |3 --- fs/btrfs/file.c|3 ++- fs/btrfs/inode.c |6 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/btrfs

[PATCH 00/19] Fix filesystem freezing deadlocks

2012-03-05 Thread Jan Kara
Hallelujah, after a couple of weeks and several rewrites, here comes the third iteration of my patches to improve filesystem freezing. Filesystem freezing is currently racy and thus we can end up with dirty data on frozen filesystem (see changelog patch 06 for detailed race description).

[PATCH 04/19] btrfs: Push mnt_want_write() outside of i_mutex

2012-03-05 Thread Jan Kara
When mnt_want_write() starts to handle freezing it will get a full lock semantics requiring proper lock ordering. So push mnt_want_write() call consistently outside of i_mutex. CC: Chris Mason chris.ma...@oracle.com CC: linux-btrfs@vger.kernel.org Signed-off-by: Jan Kara j...@suse.cz --- fs

Re: [PATCH] mkfs: Handle creation of filesystem larger than the first device

2012-02-10 Thread Jan Kara
On Wed 08-02-12 22:05:26, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/08/2012 06:20 PM, Jan Kara wrote: Thanks for your reply. I admit I was not sure what exactly size argument should be. So after looking into the code for a while I figured it should

[PATCH 4/4] btrfs: Use generic handlers of O_SYNC AIO DIO

2012-02-10 Thread Jan Kara
for proper O_SYNC AIO DIO handling. Signed-off-by: Jan Kara j...@suse.cz --- fs/btrfs/inode.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 32214fe..68add6e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6221,7 +6221,7

[PATCH 0/4] Generic O_SYNC AIO DIO handling

2012-02-10 Thread Jan Kara
Hi Jeff, these patches implement generic way of handling O_SYNC AIO DIO. They work for all filesystems except for ext4 and xfs. Thus together with your patches, all filesystems should handle O_SYNC AIO DIO correctly. I've tested ext3, btrfs, and xfs (to check that I didn't break anything

[PATCH 2/4] ocfs2: Use generic handlers of O_SYNC AIO DIO

2012-02-10 Thread Jan Kara
Use generic handlers to queue fsync() when AIO DIO is completed for O_SYNC file. Signed-off-by: Jan Kara j...@suse.cz --- fs/ocfs2/aops.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 78b68af..3d14c2b 100644 --- a/fs/ocfs2

[PATCH 1/4] vfs: Handle O_SYNC AIO DIO in generic code properly

2012-02-10 Thread Jan Kara
and the generic one is enough for them, make blockdev_direct_IO() pass DIO_SYNC_WRITES flag. Signed-off-by: Jan Kara j...@suse.cz --- fs/direct-io.c | 128 ++-- fs/super.c |2 + include/linux/fs.h | 13 +- 3 files changed, 138

[PATCH 3/4] gfs2: Use generic handlers of O_SYNC AIO DIO

2012-02-10 Thread Jan Kara
Use generic handlers to queue fsync() when AIO DIO is completed for O_SYNC file. Signed-off-by: Jan Kara j...@suse.cz --- fs/gfs2/aops.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 501e5cb..9c381ff 100644 --- a/fs/gfs2/aops.c

Re: [PATCH] mkfs: Handle creation of filesystem larger than the first device

2012-02-08 Thread Jan Kara
On Wed 08-02-12 17:01:15, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/26/2012 11:03 AM, Jan Kara wrote: make_btrfs() function takes a size of filesystem as an argument. It uses this value to set the size of the first device as well which is wrong

[PATCH] mkfs: Handle creation of filesystem larger than the first device

2012-01-26 Thread Jan Kara
as an argument to make_btrfs(). CC: David Sterba dste...@suse.cz Signed-off-by: Jan Kara j...@suse.cz --- convert.c |2 +- mkfs.c|6 -- utils.c |4 ++-- utils.h |2 +- 4 files changed, 8 insertions(+), 6 deletions(-) As a side note, I'd guess that creating filesystem

[PATCH] btrfs: Fix busyloops in transaction waiting code

2012-01-26 Thread Jan Kara
was. That is burning CPU cycles needlessly and is deadly on UP machines... Signed-off-by: Jan Kara j...@suse.cz --- fs/btrfs/tree-log.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index cb877e0..966cc74 100644 --- a/fs/btrfs/tree-log.c

[PATCH] btrfs: Fix busyloops in transaction waiting code

2012-01-25 Thread Jan Kara
was. That is burning CPU cycles needlessly and is deadly on UP machines... CC: sta...@kernel.org Signed-off-by: Jan Kara j...@suse.cz --- fs/btrfs/tree-log.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index cb877e0..966cc74 100644 --- a/fs

Re: [PATCH] fs: push file_update_time into -page_mkwrite

2011-11-29 Thread Jan Kara
://vger.kernel.org/majordomo-info.html -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Cluster-devel] fallocate vs O_(D)SYNC

2011-11-16 Thread Jan Kara
On Wed 16-11-11 07:45:50, Christoph Hellwig wrote: On Wed, Nov 16, 2011 at 11:54:13AM +0100, Jan Kara wrote: Yeah, only that nobody calls that fsync() automatically if the fd is O_SYNC if I'm right. But maybe calling fdatasync() on the range which was fallocated from sys_fallocate

Re: [PATCH 0/8] remove i_alloc_sem

2011-06-21 Thread Jan Kara
it? Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [patch] fs: fix deadlocks in writeback_if_idle

2010-11-24 Thread Jan Kara
the problem with i_mutex and I personally view it as a bug. But ultimately it's Ted's call to decide. Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body

Re: [patch] fs: fix deadlocks in writeback_if_idle

2010-11-23 Thread Jan Kara
of requests... Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [patch] fix up lock order reversal in writeback

2010-11-23 Thread Jan Kara
On Tue 23-11-10 19:07:58, Nick Piggin wrote: On Mon, Nov 22, 2010 at 07:16:55PM +0100, Jan Kara wrote: On Fri 19-11-10 16:16:19, Nick Piggin wrote: On Fri, Nov 19, 2010 at 01:45:52AM +0100, Jan Kara wrote: On Wed 17-11-10 22:28:34, Andrew Morton wrote: The fact that a call

Re: [patch] fix up lock order reversal in writeback

2010-11-22 Thread Jan Kara
On Fri 19-11-10 16:16:19, Nick Piggin wrote: On Fri, Nov 19, 2010 at 01:45:52AM +0100, Jan Kara wrote: On Wed 17-11-10 22:28:34, Andrew Morton wrote: The fact that a call to -write_begin can randomly return with s_umount held, to be randomly released at some random time in the future

Re: [PATCH 1/6] fs: add hole punching to fallocate

2010-11-18 Thread Jan Kara
() since it already looks like the normal fallocate() operation. I've tested this patch with XFS and BTRFS to make sure XFS did what it's supposed to do and that BTRFS failed like it was supposed to. Thank you, Looks nice now. Acked-by: Jan Kara j...@suse.cz

Re: [patch] fix up lock order reversal in writeback

2010-11-18 Thread Jan Kara
. Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/6] fs: add hole punching to fallocate

2010-11-16 Thread Jan Kara
On Tue 16-11-10 12:16:11, Jan Kara wrote: On Mon 15-11-10 12:05:18, Josef Bacik wrote: diff --git a/fs/open.c b/fs/open.c index 4197b9e..ab8dedf 100644 --- a/fs/open.c +++ b/fs/open.c @@ -223,7 +223,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len

Re: [PATCH 3/6] Ocfs2: handle hole punching via fallocate properly

2010-11-16 Thread Jan Kara
joel.bec...@oracle.com who maintains OCFS2. Otherwise the patch looks OK so you can add Acked-by: Jan Kara j...@suse.cz for what it's worth ;). Honza --- fs/ocfs2/file.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions

Re: [PATCH 4/6] Ext4: fail if we try to use hole punch

2010-11-16 Thread Jan Kara
On Mon 15-11-10 12:05:21, Josef Bacik wrote: Ext4 doesn't have the ability to punch holes yet, so make sure we return EOPNOTSUPP if we try to use hole punching through fallocate. This support can be added later. Thanks, Signed-off-by: Josef Bacik jo...@redhat.com Acked-by: Jan Kara j

Re: [patch] fix up lock order reversal in writeback

2010-11-16 Thread Jan Kara
cannot get umount_sem because they hold other locks, they have the superblock well pinned so grabbing umount_sem makes sense mostly to make assertions happy. But as I'm thinking about it, trylock *is* maybe the right answer to this anyway... So Acked-by: Jan Kara j...@suse.cz

Re: [PATCH 1/6] fs: add hole punching to fallocate

2010-11-09 Thread Jan Kara
could be used to help solving this problem... Just curious... Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org

Re: Dirtiable inode bdi default != sb bdi btrfs

2010-09-29 Thread Jan Kara
... Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Dirtiable inode bdi default != sb bdi btrfs

2010-09-29 Thread Jan Kara
On Mon 27-09-10 20:55:45, Cesar Eduardo Barros wrote: Em 27-09-2010 19:25, Jan Kara escreveu: [Added CCs for similar ecryptfs warning] On Thu 23-09-10 12:38:49, Andrew Morton wrote: [...] device fsid 44d595920ddedfa-3ece6b56e80f689e devid 1 transid 22342 /dev/mapper/vg_cesarbinspiro-lv_home

Re: Dirtiable inode bdi default != sb bdi btrfs

2010-09-29 Thread Jan Kara
On Wed 29-09-10 16:10:06, Christoph Hellwig wrote: On Wed, Sep 29, 2010 at 02:18:08PM +0200, Jan Kara wrote: On Wed 29-09-10 10:19:36, Christoph Hellwig wrote: --- From: Christoph Hellwig h...@lst.de Subject: [PATCH] writeback: always use sb-s_bdi for writeback purposes

Re: Dirtiable inode bdi default != sb bdi btrfs

2010-09-27 Thread Jan Kara
in inode_init_always(). The patch below makes at least btrfs happy for me... Could you maybe test it? Thanks. Honza -- Jan Kara j...@suse.cz SUSE Labs, CR --- From 29f60c2b08ff9637a10439d1513805835ddcc746 Mon Sep 17 00:00:00 2001

Re: Dirtiable inode bdi default != sb bdi btrfs

2010-09-27 Thread Jan Kara
On Mon 27-09-10 18:54:52, Chris Mason wrote: On Tue, Sep 28, 2010 at 12:25:48AM +0200, Jan Kara wrote: [Added CCs for similar ecryptfs warning] On Thu 23-09-10 12:38:49, Andrew Morton wrote: This started appearing for me on v2.6.36-rc5-49-gc79bd89; it did not happen on v2.6.36-rc5-33

Re: [patch v2 1/5] mm: add nofail variants of kmalloc kcalloc and kzalloc

2010-09-02 Thread Jan Kara
to the patch is imperfect in this sence... Honza -- Jan Kara j...@suse.cz SUSE Labs, CR -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info

Usefulness of max_transid in the tree search?

2010-08-20 Thread Jan Kara
Hi, I just had a look at how btrfs ioctl searches the tree for new items and while looking at the code I've noticed that maximum transaction id as specified in the search is rather useless. If I understand right, transaction id is stored in a header of each node. Thus when any item of the

[PATCH] btrfs: Do not return more items that user asked from from search ioctl

2010-08-20 Thread Jan Kara
-by: Jan Kara j...@suse.cz --- fs/btrfs/ioctl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9254b3d..94e7ab5 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -977,7 +977,7 @@ static noinline int copy_to_sk(struct btrfs_root

<    1   2   3