Re: [GIT PULL] Btrfs fixes for 4.17-rc6

2018-05-20 Thread Linus Torvalds
On Sun, May 20, 2018 at 8:21 AM David Sterba  wrote:

> They IMHO qualify for a late rc, though I did not expect that many.

Especially with the tree-log.c changes being fairly big, I took a look, and
I have to say that I appreciate (a) the warning in the pull request and (b)
the extensive log messages explaining the problems these patches fix.

I obviously still prefer to see only small and simple one-liners just
before I'm making ready to release rc6, but in the absence of oneliners I
do appreciate good explanations.

Thanks,

   Linus
--
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


[GIT PULL] Btrfs fixes for 4.17-rc6

2018-05-20 Thread David Sterba
Hi,

we've accumulated some fixes during the last week, some of them were in
the works for a longer time but there are some newer ones too. Most of
the fixes have a reproducer and fix user visible problems, also
candidates for stable kernels. They IMHO qualify for a late rc, though I
did not expect that many.

The commit date may differ from author date because I added the stable
and Fixes tags where missing. There are no merge conflicts against
current master.

Please pull, thanks.


The following changes since commit a6aa10c70bf72fb28504cb5de5deac75da78b0f5:

  Btrfs: send, fix missing truncate for inode with prealloc extent past eof 
(2018-05-02 11:55:29 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.17-rc5-tag

for you to fetch changes up to 02ee654d3a04563c67bfe658a05384548b9bb105:

  btrfs: fix crash when trying to resume balance without the resume flag 
(2018-05-17 14:38:24 +0200)


Anand Jain (1):
  btrfs: fix crash when trying to resume balance without the resume flag

Filipe Manana (2):
  Btrfs: fix xattr loss after power failure
  Btrfs: fix duplicate extents after fsync of file with prealloc extents

Liu Bo (1):
  btrfs: fix reading stale metadata blocks after degraded raid1 mounts

Misono Tomohiro (1):
  btrfs: property: Set incompat flag if lzo/zstd compression is set

Nikolay Borisov (2):
  btrfs: Split btrfs_del_delalloc_inode into 2 functions
  btrfs: Fix delalloc inodes invalidation during transaction abort

Robbie Ko (1):
  Btrfs: send, fix invalid access to commit roots due to concurrent 
snapshotting

 fs/btrfs/ctree.c|  22 ++--
 fs/btrfs/ctree.h|   2 +
 fs/btrfs/disk-io.c  |  26 ++
 fs/btrfs/inode.c|  13 +++--
 fs/btrfs/props.c|  12 +++--
 fs/btrfs/tree-log.c | 144 +++-
 fs/btrfs/volumes.c  |   9 
 7 files changed, 180 insertions(+), 48 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.17-rc1

2018-04-22 Thread David Sterba
Hi,

the branch contains a few fixups to qgroup patches that were merged this
dev cycle, unaligned access fix, blockgroup removal corner case fix and
a small debugging output tweak.

Please pull, thanks.


The following changes since commit 5d41be6f702f19f72db816c17175caf9dbdcdfa6:

  btrfs: Only check first key for committed tree blocks (2018-04-13 16:16:15 
+0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.17-rc1-tag

for you to fetch changes up to c0872323746e11fc79344e3738b283a8cda86654:

  btrfs: print-tree: debugging output enhancement (2018-04-20 19:18:16 +0200)


David Sterba (1):
  btrfs: fix unaligned access in readdir

Nikolay Borisov (1):
  btrfs: Fix race condition between delayed refs and blockgroup removal

Qu Wenruo (5):
  btrfs: qgroup: Commit transaction in advance to reduce early EDQUOT
  btrfs: qgroup: Use independent and accurate per inode qgroup rsv
  btrfs: delayed-inode: Remove wrong qgroup meta reservation calls
  btrfs: Fix wrong btrfs_delalloc_release_extents parameter
  btrfs: print-tree: debugging output enhancement

 fs/btrfs/ctree.h | 25 +
 fs/btrfs/delayed-inode.c | 20 ++---
 fs/btrfs/delayed-ref.c   | 19 +
 fs/btrfs/delayed-ref.h   |  1 +
 fs/btrfs/disk-io.c   |  1 +
 fs/btrfs/extent-tree.c   | 73 +---
 fs/btrfs/file.c  |  2 +-
 fs/btrfs/inode.c | 20 +++--
 fs/btrfs/print-tree.c| 25 ++---
 fs/btrfs/print-tree.h|  2 +-
 fs/btrfs/qgroup.c| 43 ++--
 fs/btrfs/transaction.c   |  1 +
 fs/btrfs/transaction.h   | 14 ++
 13 files changed, 199 insertions(+), 47 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.16-rc6

2018-03-16 Thread David Sterba
Hi,

there's an important revert in this pull request that needs to go to
stable as it causes a corruption on big endian machines. The other fix
is for FIEMAP incorrectly reporting shared extents before a sync and one
fix for a crash in raid56.

So far we got only one report about the BE corruption, the stable
kernels were out for like a week, so hopefully the scope of the damage
is low.

Please pull, thanks.


The following changes since commit 1f250e929a9c9332fd6ea34da684afee73837cfe:

  Btrfs: fix log replay failure after unlink and link combination (2018-03-01 
16:18:40 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.16-rc5-tag

for you to fetch changes up to 093e037ca88e1767693bc6bcb2df3f49c6be68c7:

  Revert "btrfs: use proper endianness accessors for super_copy" (2018-03-16 
14:49:44 +0100)


David Sterba (1):
  Revert "btrfs: use proper endianness accessors for super_copy"

Dmitriy Gorokh (1):
  btrfs: Fix NULL pointer exception in find_bio_stripe

Edmund Nadolski (1):
  btrfs: add missing initialization in btrfs_check_shared

 fs/btrfs/backref.c |  1 +
 fs/btrfs/raid56.c  |  1 +
 fs/btrfs/sysfs.c   |  8 +---
 fs/btrfs/transaction.c | 20 
 4 files changed, 15 insertions(+), 15 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.16-rc4

2018-03-04 Thread David Sterba
Hi,

please consider the follwing btrfs updates, there are bugfixes or fixes
for user visible behaviour.

No merge conflicts. Please pull, thanks.

- when NR_CPUS is large, a SRCU structure can significantly inflate size
  of the main filesystem structure that would not be possible to
  allocate by kmalloc, so the kvalloc fallback is used

- improved error handling

- fix endiannes when printing some filesystem attributes via sysfs, this
  is could happen when a filesystem is moved between different endianity
  hosts

- send fixes: the NO_HOLE mode should not send a write operation for a
  file hole

- fix log replay for for special files followed by file hardlinks

- fix log replay failure after unlink and link combination

- fix max chunk size calculation for DUP allocation


The following changes since commit fd649f10c3d21ee9d7542c609f29978bdf73ab94:

  btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device 
(2018-02-05 17:15:14 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.16-rc3-tag

for you to fetch changes up to 1f250e929a9c9332fd6ea34da684afee73837cfe:

  Btrfs: fix log replay failure after unlink and link combination (2018-03-01 
16:18:40 +0100)


Anand Jain (1):
  btrfs: use proper endianness accessors for super_copy

Filipe Manana (3):
  Btrfs: send, fix issuing write op when processing hole in no data mode
  Btrfs: fix log replay failure after linking special file and fsync
  Btrfs: fix log replay failure after unlink and link combination

Hans van Kranenburg (1):
  btrfs: alloc_chunk: fix DUP stripe size handling

Jeff Mahoney (1):
  btrfs: use kvzalloc to allocate btrfs_fs_info

Nikolay Borisov (2):
  btrfs: handle failure of add_pending_csums
  btrfs: Handle btrfs_set_extent_delalloc failure in 
relocate_file_extent_cluster

 fs/btrfs/ctree.h   |   7 ++-
 fs/btrfs/inode-item.c  |  44 +++
 fs/btrfs/inode.c   |  11 -
 fs/btrfs/relocation.c  |  18 +++-
 fs/btrfs/send.c|   3 ++
 fs/btrfs/super.c   |   2 +-
 fs/btrfs/sysfs.c   |   8 ++--
 fs/btrfs/transaction.c |  20 +
 fs/btrfs/tree-log.c| 114 +++--
 fs/btrfs/volumes.c |  11 ++---
 10 files changed, 191 insertions(+), 47 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.16-rc1

2018-02-16 Thread David Sterba
Hi,

we have a few assorted fixes, some of them show up during fstests so
I gave them more testing. Please pull, thanks.


The following changes since commit 3acbcbfc8f06d4ade2aab2ebba0a2542a05ce90c:

  btrfs: drop devid as device_list_add() arg (2018-01-29 19:31:16 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.16-rc1-tag

for you to fetch changes up to fd649f10c3d21ee9d7542c609f29978bdf73ab94:

  btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device 
(2018-02-05 17:15:14 +0100)


Filipe Manana (1):
  Btrfs: fix null pointer dereference when replacing missing device

Liu Bo (6):
  Btrfs: fix deadlock in run_delalloc_nocow
  Btrfs: fix crash due to not cleaning up tree log block's dirty bits
  Btrfs: fix extent state leak from tree log
  Btrfs: fix btrfs_evict_inode to handle abnormal inodes correctly
  Btrfs: fix use-after-free on root->orphan_block_rsv
  Btrfs: fix unexpected -EEXIST when creating new inode

Nikolay Borisov (2):
  btrfs: Ignore errors from btrfs_qgroup_trace_extent_post
  btrfs: Fix use-after-free when cleaning up fs_devs with a single stale 
device

Zygo Blaxell (1):
  btrfs: remove spurious WARN_ON(ref->count < 0) in find_parent_nodes

 fs/btrfs/backref.c | 11 ++-
 fs/btrfs/delayed-ref.c |  3 ++-
 fs/btrfs/extent-tree.c |  4 
 fs/btrfs/inode.c   | 41 ++---
 fs/btrfs/qgroup.c  |  9 +++--
 fs/btrfs/tree-log.c| 32 ++--
 fs/btrfs/volumes.c |  1 +
 7 files changed, 80 insertions(+), 21 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.15-rc7

2018-01-05 Thread David Sterba
Hi,

we have two more fixes for 4.15, aimed for stable. The leak fix is
obvious, the second patch fixes a bug revealed by the refcount API, when
it behaves differently than previous atomic_t and reports refs going
from 0 to 1 in one case.

No merge conflicts. Please pull, thanks.

The following changes since commit c8bcbfbd239ed60a6562964b58034ac8a25f4c31:

  btrfs: Fix possible off-by-one in btrfs_search_path_in_tree (2017-12-07 
00:35:15 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.15-rc7-tag

for you to fetch changes up to ec35e48b286959991cdbb886f1bdeda4575c80b4:

  btrfs: fix refcount_t usage when deleting btrfs_delayed_nodes (2018-01-02 
18:00:14 +0100)


Chris Mason (1):
  btrfs: fix refcount_t usage when deleting btrfs_delayed_nodes

Nikolay Borisov (1):
  btrfs: Fix flush bio leak

 fs/btrfs/delayed-inode.c | 45 ++---
 fs/btrfs/volumes.c   |  1 -
 2 files changed, 34 insertions(+), 12 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.15-rc3

2017-12-09 Thread David Sterba
Hi,

this update contains a few fixes (error handling, quota leak, FUA vs
nobarrier mount option).  There's one one worth mentioning separately -
an off-by-one fix that leads to overwriting first byte of an adjacent
page with 0, out of bounds of the memory allocated by an ioctl.  This is
under a privileged part of the ioctl, can be triggerd in some subvolume
layouts.

After the last tags and branches mess [1], let me note that the pull url
is pointed to the signed tag. There are no merge conflics. Please pull,
thanks.

[1] https://lkml.org/lkml/2017/11/29/952


The following changes since commit ea37d5998b50a72b9045ba60a132eeb20e1c4230:

  Btrfs: incremental send, fix wrong unlink path after renaming file 
(2017-11-28 17:15:30 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.15-rc3-tag

for you to fetch changes up to c8bcbfbd239ed60a6562964b58034ac8a25f4c31:

  btrfs: Fix possible off-by-one in btrfs_search_path_in_tree (2017-12-07 
00:35:15 +0100)


Jeff Mahoney (2):
  btrfs: handle errors while updating refcounts in update_ref_for_cow
  btrfs: fix missing error return in btrfs_drop_snapshot

Justin Maggard (1):
  btrfs: Fix quota reservation leak on preallocated files

Nikolay Borisov (1):
  btrfs: Fix possible off-by-one in btrfs_search_path_in_tree

Omar Sandoval (1):
  Btrfs: disable FUA if mounted with nobarrier

 fs/btrfs/ctree.c   | 18 --
 fs/btrfs/disk-io.c | 12 +---
 fs/btrfs/extent-tree.c |  1 +
 fs/btrfs/inode.c   |  2 ++
 fs/btrfs/ioctl.c   |  2 +-
 5 files changed, 21 insertions(+), 14 deletions(-)
--
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: [GIT PULL] Btrfs fixes for 4.15-rc2

2017-11-30 Thread David Sterba
On Wed, Nov 29, 2017 at 02:31:24PM -0800, Linus Torvalds wrote:
> On Wed, Nov 29, 2017 at 11:28 AM, David Sterba  wrote:
> >
> > With signed tag: for-4.15-rc2-tag
> >
> >   git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.15-rc2
> 
> Oh, please actually ask me to pull the signed tag (exact same
> pull-request, just point git request-pull at the tag),

Will do next time.

> because now
> what happened was that first I just pulled that branch you mentioned,
> and only noticed that "With signed tag:" notice after I had already
> pulled and was filling in the merge message.
> 
> Anyway, I redid the pull with the proper signed tag, but it was just
> annoying extra work.
> 
> And I wonder how many times I _hadn't_ noticed that, because I didn't
> have your key in my keyring either. Or maybe I caught it the first
> time.

All my previous pull requests were like that. I did the split branch/tag
beacuse the ambiguous name for branch and brings some hassle to push or
remove them. I thought a separate tag with same top commit as the branch
plus mentioning the tag in the mail would be enough to verify the pulled
branch. But apparently was not, sorry for the trouble. 
--
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: [GIT PULL] Btrfs fixes for 4.15-rc2

2017-11-29 Thread Linus Torvalds
On Wed, Nov 29, 2017 at 11:28 AM, David Sterba  wrote:
>
> With signed tag: for-4.15-rc2-tag
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.15-rc2

Oh, please actually ask me to pull the signed tag (exact same
pull-request, just point git request-pull at the tag), because now
what happened was that first I just pulled that branch you mentioned,
and only noticed that "With signed tag:" notice after I had already
pulled and was filling in the merge message.

Anyway, I redid the pull with the proper signed tag, but it was just
annoying extra work.

And I wonder how many times I _hadn't_ noticed that, because I didn't
have your key in my keyring either. Or maybe I caught it the first
time.

Linus
--
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


[GIT PULL] Btrfs fixes for 4.15-rc2

2017-11-29 Thread David Sterba
Hi,

we've collected some fixes in since the pre-merge window freeze. There's
technically only one regression fix for 4.15, but the rest seems important and
candidates for stable. No merge conflicts, please pull, thanks.

- fix missing flush bio puts in error cases (is serious, but rarely happens)

- fix reporting stat::st_blocks for buffered append writes

- fix space cache invalidation

- fix out of bound memory access when setting zlib level

- fix potential memory corruption when fsync fails in the middle

- fix crash in integrity checker

- incremetnal send fix, path mixup for certain unlink/rename combination

- pass flags to writeback so compressed writes can be throttled properly

- error handling fixes

With signed tag: for-4.15-rc2-tag


The following changes since commit d28e649a5c58b779b303c252c66ee84a0f2c3b32:

  btrfs: Fix bug for misused dev_t when lookup in dev state hash table. 
(2017-11-01 20:45:36 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.15-rc2

for you to fetch changes up to ea37d5998b50a72b9045ba60a132eeb20e1c4230:

  Btrfs: incremental send, fix wrong unlink path after renaming file 
(2017-11-28 17:15:30 +0100)


David Sterba (2):
  btrfs: add missing device::flush_bio puts
  btrfs: dev_alloc_list is not protected by RCU, use normal list_del

Filipe Manana (3):
  Btrfs: move definition of the function btrfs_find_new_delalloc_bytes
  Btrfs: fix reported number of inode blocks after buffered append writes
  Btrfs: incremental send, fix wrong unlink path after renaming file

Josef Bacik (2):
  btrfs: clear space cache inode generation always
  btrfs: fix deadlock when writing out space cache

Liu Bo (3):
  Btrfs: add write_flags for compression bio
  Btrfs: bail out gracefully rather than BUG_ON
  Btrfs: fix list_add corruption and soft lockups in fsync

Nikolay Borisov (1):
  btrfs: Fix transaction abort during failure in btrfs_rm_dev_item

Qu Wenruo (2):
  btrfs: Fix wild memory access in compression level parser
  btrfs: tree-checker: Fix false panic for sanity test

 fs/btrfs/compression.c   |   9 +--
 fs/btrfs/compression.h   |   5 +-
 fs/btrfs/ctree.h |   1 +
 fs/btrfs/disk-io.c   |  10 ++-
 fs/btrfs/extent-tree.c   |  14 ++---
 fs/btrfs/extent_io.c |   2 +-
 fs/btrfs/extent_io.h |   8 ++-
 fs/btrfs/file.c  | 130 +--
 fs/btrfs/free-space-cache.c  |   3 +-
 fs/btrfs/inode.c |  34 +++---
 fs/btrfs/relocation.c|   3 +-
 fs/btrfs/send.c  | 124 +++--
 fs/btrfs/super.c |  13 +++-
 fs/btrfs/tests/extent-io-tests.c |   6 +-
 fs/btrfs/tests/inode-tests.c |  12 ++--
 fs/btrfs/tree-checker.c  |  27 ++--
 fs/btrfs/tree-checker.h  |  14 -
 fs/btrfs/tree-log.c  |   2 +-
 fs/btrfs/volumes.c   |  32 +++---
 19 files changed, 314 insertions(+), 135 deletions(-)
--
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: [GIT PULL] Btrfs fixes for 4.14-rc4

2017-10-06 Thread Liu Bo
On Fri, Oct 06, 2017 at 11:25:12PM +0100, Tomasz Kłoczko wrote:
> On rc3 is possible to observe warning about possible circular locking
> dependency which I've reported on btrfs list few days ago:
>

Thanks for the report, neither this nor the one you reported on rc2
looks like a deadlock to me.

- %mmap_sem is always 'current->mm->mmap_sem',
- fsync doesn't acquire %mmap_sem, does it?

Not sure why we have a dependency here, tend to be a false one.

thanks,
-liubo

> [  101.326724] ==
> [  101.326728] WARNING: possible circular locking dependency detected
> [  101.326734] 4.14.0-0.rc3.git1.1.fc28.x86_64 #1 Not tainted
> [  101.326738] --
> [  101.326743] mysqld/1253 is trying to acquire lock:
> [  101.326747]  (>mmap_sem){}, at: []
> get_user_pages_unlocked+0x5e/0x1b0
> [  101.326771]
> [  101.326775]  (>dio_sem){}, at: []
> btrfs_direct_IO+0x39f/0x400 [btrfs]
> [  101.326846]
> [  101.326851]
> [  101.326856]
> [  101.326875]__lock_acquire+0x1107/0x11d0
> [  101.326883]lock_acquire+0xa3/0x1f0
> [  101.326892]down_write+0x51/0xc0
> [  101.326949]btrfs_log_changed_extents+0x7e/0x6c0 [btrfs]
> [  101.327000]btrfs_log_inode+0x9c1/0x11d0 [btrfs]
> [  101.327049]btrfs_log_inode_parent+0x2df/0xad0 [btrfs]
> [  101.327096]btrfs_log_dentry_safe+0x60/0x80 [btrfs]
> [  101.327144]btrfs_sync_file+0x344/0x4f0 [btrfs]
> [  101.327155]vfs_fsync_range+0x4b/0xb0
> [  101.327162]do_fsync+0x3d/0x70
> [  101.327170]SyS_fsync+0x10/0x20
> [  101.327179]do_syscall_64+0x6c/0x1f0
> [  101.327185]return_from_SYSCALL_64+0x0/0x7a
> [  101.327188]
> [  101.327204]__lock_acquire+0x1107/0x11d0
> [  101.327212]lock_acquire+0xa3/0x1f0
> [  101.327219]__mutex_lock+0x7f/0xa40
> [  101.327226]mutex_lock_nested+0x1b/0x20
> [  101.327272]btrfs_log_inode+0x159/0x11d0 [btrfs]
> [  101.327317]btrfs_log_inode_parent+0x2df/0xad0 [btrfs]
> [  101.327360]btrfs_log_dentry_safe+0x60/0x80 [btrfs]
> [  101.327407]btrfs_sync_file+0x344/0x4f0 [btrfs]
> [  101.327415]vfs_fsync_range+0x4b/0xb0
> [  101.327422]do_fsync+0x3d/0x70
> [  101.327429]SyS_fsync+0x10/0x20
> [  101.327435]do_syscall_64+0x6c/0x1f0
> [  101.327441]return_from_SYSCALL_64+0x0/0x7a
> [  101.327444]
> [  101.327463]__sb_start_write+0x12b/0x1a0
> [  101.327508]start_transaction+0x368/0x4d0 [btrfs]
> [  101.327549]btrfs_join_transaction+0x1d/0x20 [btrfs]
> [  101.327589]delayed_ref_async_start+0x67/0xd0 [btrfs]
> [  101.327637]btrfs_worker_helper+0x93/0x610 [btrfs]
> [  101.327640]
> [  101.327656]__lock_acquire+0x1107/0x11d0
> [  101.327664]lock_acquire+0xa3/0x1f0
> [  101.327671]wait_for_completion+0x62/0x1d0
> [  101.327710]btrfs_async_run_delayed_refs+0x163/0x180 [btrfs]
> [  101.327752]__btrfs_end_transaction+0x1f2/0x2e0 [btrfs]
> [  101.327790]btrfs_end_transaction+0x10/0x20 [btrfs]
> [  101.327832]btrfs_dirty_inode+0x71/0xd0 [btrfs]
> [  101.327871]btrfs_update_time+0x81/0xc0 [btrfs]
> [  101.327877]touch_atime+0xab/0xd0
> [  101.327920]btrfs_file_mmap+0x44/0x60 [btrfs]
> [  101.327927]mmap_region+0x3a3/0x5d0
> [  101.327932]do_mmap+0x2b6/0x410
> [  101.327938]vm_mmap_pgoff+0xcf/0x120
> [  101.327943]SyS_mmap_pgoff+0x1e1/0x280
> [  101.327949]SyS_mmap+0x1b/0x30
> [  101.327955]entry_SYSCALL_64_fastpath+0x1f/0xbe
> [  101.327958]
> [  101.327974]check_prev_add+0x351/0x700
> [  101.327981]__lock_acquire+0x1107/0x11d0
> [  101.327989]lock_acquire+0xa3/0x1f0
> [  101.327996]down_read+0x48/0xb0
> [  101.328003]get_user_pages_unlocked+0x5e/0x1b0
> [  101.328009]get_user_pages_fast+0x7a/0xc0
> [  101.328018]iov_iter_get_pages+0xc9/0x300
> [  101.328026]do_blockdev_direct_IO+0x192b/0x2940
> [  101.328034]__blockdev_direct_IO+0x2e/0x30
> [  101.328073]btrfs_direct_IO+0x171/0x400 [btrfs]
> [  101.328080]generic_file_direct_write+0xa3/0x160
> [  101.328123]btrfs_file_write_iter+0x2fb/0x610 [btrfs]
> [  101.328129]aio_write+0x116/0x1a0
> [  101.328134]do_io_submit+0x42d/0x940
> [  101.328139]SyS_io_submit+0x10/0x20
> [  101.328145]entry_SYSCALL_64_fastpath+0x1f/0xbe
> [  101.328149]
> [  101.328154] Chain exists of:
> [  101.328169]  Possible unsafe locking scenario:
> [  101.328174]CPU0CPU1
> [  101.328177]
> [  101.328180]   lock(>dio_sem);
> [  101.328187]lock(>log_mutex);
> [  101.328194]lock(>dio_sem);
> [  101.328200]   lock(>mmap_sem);
> [  101.328206]
> [  

Re: [GIT PULL] Btrfs fixes for 4.14-rc4

2017-10-06 Thread Tomasz Kłoczko
On rc3 is possible to observe warning about possible circular locking
dependency which I've reported on btrfs list few days ago:

[  101.326724] ==
[  101.326728] WARNING: possible circular locking dependency detected
[  101.326734] 4.14.0-0.rc3.git1.1.fc28.x86_64 #1 Not tainted
[  101.326738] --
[  101.326743] mysqld/1253 is trying to acquire lock:
[  101.326747]  (>mmap_sem){}, at: []
get_user_pages_unlocked+0x5e/0x1b0
[  101.326771]
[  101.326775]  (>dio_sem){}, at: []
btrfs_direct_IO+0x39f/0x400 [btrfs]
[  101.326846]
[  101.326851]
[  101.326856]
[  101.326875]__lock_acquire+0x1107/0x11d0
[  101.326883]lock_acquire+0xa3/0x1f0
[  101.326892]down_write+0x51/0xc0
[  101.326949]btrfs_log_changed_extents+0x7e/0x6c0 [btrfs]
[  101.327000]btrfs_log_inode+0x9c1/0x11d0 [btrfs]
[  101.327049]btrfs_log_inode_parent+0x2df/0xad0 [btrfs]
[  101.327096]btrfs_log_dentry_safe+0x60/0x80 [btrfs]
[  101.327144]btrfs_sync_file+0x344/0x4f0 [btrfs]
[  101.327155]vfs_fsync_range+0x4b/0xb0
[  101.327162]do_fsync+0x3d/0x70
[  101.327170]SyS_fsync+0x10/0x20
[  101.327179]do_syscall_64+0x6c/0x1f0
[  101.327185]return_from_SYSCALL_64+0x0/0x7a
[  101.327188]
[  101.327204]__lock_acquire+0x1107/0x11d0
[  101.327212]lock_acquire+0xa3/0x1f0
[  101.327219]__mutex_lock+0x7f/0xa40
[  101.327226]mutex_lock_nested+0x1b/0x20
[  101.327272]btrfs_log_inode+0x159/0x11d0 [btrfs]
[  101.327317]btrfs_log_inode_parent+0x2df/0xad0 [btrfs]
[  101.327360]btrfs_log_dentry_safe+0x60/0x80 [btrfs]
[  101.327407]btrfs_sync_file+0x344/0x4f0 [btrfs]
[  101.327415]vfs_fsync_range+0x4b/0xb0
[  101.327422]do_fsync+0x3d/0x70
[  101.327429]SyS_fsync+0x10/0x20
[  101.327435]do_syscall_64+0x6c/0x1f0
[  101.327441]return_from_SYSCALL_64+0x0/0x7a
[  101.327444]
[  101.327463]__sb_start_write+0x12b/0x1a0
[  101.327508]start_transaction+0x368/0x4d0 [btrfs]
[  101.327549]btrfs_join_transaction+0x1d/0x20 [btrfs]
[  101.327589]delayed_ref_async_start+0x67/0xd0 [btrfs]
[  101.327637]btrfs_worker_helper+0x93/0x610 [btrfs]
[  101.327640]
[  101.327656]__lock_acquire+0x1107/0x11d0
[  101.327664]lock_acquire+0xa3/0x1f0
[  101.327671]wait_for_completion+0x62/0x1d0
[  101.327710]btrfs_async_run_delayed_refs+0x163/0x180 [btrfs]
[  101.327752]__btrfs_end_transaction+0x1f2/0x2e0 [btrfs]
[  101.327790]btrfs_end_transaction+0x10/0x20 [btrfs]
[  101.327832]btrfs_dirty_inode+0x71/0xd0 [btrfs]
[  101.327871]btrfs_update_time+0x81/0xc0 [btrfs]
[  101.327877]touch_atime+0xab/0xd0
[  101.327920]btrfs_file_mmap+0x44/0x60 [btrfs]
[  101.327927]mmap_region+0x3a3/0x5d0
[  101.327932]do_mmap+0x2b6/0x410
[  101.327938]vm_mmap_pgoff+0xcf/0x120
[  101.327943]SyS_mmap_pgoff+0x1e1/0x280
[  101.327949]SyS_mmap+0x1b/0x30
[  101.327955]entry_SYSCALL_64_fastpath+0x1f/0xbe
[  101.327958]
[  101.327974]check_prev_add+0x351/0x700
[  101.327981]__lock_acquire+0x1107/0x11d0
[  101.327989]lock_acquire+0xa3/0x1f0
[  101.327996]down_read+0x48/0xb0
[  101.328003]get_user_pages_unlocked+0x5e/0x1b0
[  101.328009]get_user_pages_fast+0x7a/0xc0
[  101.328018]iov_iter_get_pages+0xc9/0x300
[  101.328026]do_blockdev_direct_IO+0x192b/0x2940
[  101.328034]__blockdev_direct_IO+0x2e/0x30
[  101.328073]btrfs_direct_IO+0x171/0x400 [btrfs]
[  101.328080]generic_file_direct_write+0xa3/0x160
[  101.328123]btrfs_file_write_iter+0x2fb/0x610 [btrfs]
[  101.328129]aio_write+0x116/0x1a0
[  101.328134]do_io_submit+0x42d/0x940
[  101.328139]SyS_io_submit+0x10/0x20
[  101.328145]entry_SYSCALL_64_fastpath+0x1f/0xbe
[  101.328149]
[  101.328154] Chain exists of:
[  101.328169]  Possible unsafe locking scenario:
[  101.328174]CPU0CPU1
[  101.328177]
[  101.328180]   lock(>dio_sem);
[  101.328187]lock(>log_mutex);
[  101.328194]lock(>dio_sem);
[  101.328200]   lock(>mmap_sem);
[  101.328206]
[  101.328213] 2 locks held by mysqld/1253:
[  101.328217]  #0:  (sb_writers#10){.+.+}, at: []
aio_write+0x191/0x1a0
[  101.328231]  #1:  (>dio_sem){}, at: []
btrfs_direct_IO+0x39f/0x400 [btrfs]
[  101.328277]
[  101.328285] CPU: 0 PID: 1253 Comm: mysqld Not tainted
4.14.0-0.rc3.git1.1.fc28.x86_64 #1
[  101.328290] Hardware name: Sony Corporation VPCSB2M9E/VAIO, BIOS
R2087H4 06/15/2012
[  101.328294] Call Trace:
[  101.328304]  dump_stack+0x8e/0xd6
[  101.328314]  print_circular_bug+0x1f6/0x2e0
[  101.328322]  ? 

[GIT PULL] Btrfs fixes for 4.14-rc4

2017-10-06 Thread David Sterba
Hi,

we have two more fixes for bugs introduced in 4.13. The sector_t problem with
32bit architecture and !LBDAF config seems serious but the number of affected
deployments is hopefully low.  The clashing status bits could lead to a
confusing in-memory state of the whole-filesystem operations if used with the
quota override sysfs knob.

Please pull, thanks.

The following changes since commit 8c6c592831a09a28428448e68fb08c6bbb8b9b8b:

  btrfs: log csums for all modified extents (2017-09-26 14:54:16 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.14-rc4

for you to fetch changes up to 69ad59767d094752c23c0fc180a79532fde073d0:

  Btrfs: fix overlap of fs_info::flags values (2017-10-04 16:44:18 +0200)


Goffredo Baroncelli (1):
  btrfs: avoid overflow when sector_t is 32 bit

Tsutomu Itoh (1):
  Btrfs: fix overlap of fs_info::flags values

 fs/btrfs/ctree.h | 2 +-
 fs/btrfs/extent_io.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.14-rc3

2017-09-29 Thread David Sterba
Hi,

we've collected a bunch of isolated fixes, for crashes, user-visible behaviour
or missing bits from other subsystem cleanups from the past.  The overall
number is not small but I was not able to make it significantly smaller. Most
of the patches are supposed to go to stable. There are no merge conflicts.
Please pull, thanks.

The following changes since commit db95c876c568cef951fbbd4c0118cb5386e4bb99:

  btrfs: submit superblock io with REQ_META and REQ_PRIO (2017-08-22 13:22:05 
+0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.14-rc3

for you to fetch changes up to 8c6c592831a09a28428448e68fb08c6bbb8b9b8b:

  btrfs: log csums for all modified extents (2017-09-26 14:54:16 +0200)


Josef Bacik (1):
  btrfs: log csums for all modified extents

Liu Bo (7):
  Btrfs: use the new helper wbc_to_write_flags
  Btrfs: do not reset bio->bi_ops while writing bio
  Btrfs: do not backup tree roots when fsync
  Btrfs: use btrfs_op instead of bio_op in __btrfs_map_block
  Btrfs: fix kernel oops while reading compressed data
  Btrfs: skip checksum when reading compressed data if some IO have failed
  Btrfs: fix unexpected result when dio reading corrupted blocks

Misono, Tomohiro (1):
  btrfs: remove BTRFS_FS_QUOTA_DISABLING flag

Naohiro Aota (4):
  btrfs: clear ordered flag on cleaning up ordered extents
  btrfs: finish ordered extent cleaning if no progress is found
  btrfs: fix NULL pointer dereference from free_reloc_roots()
  btrfs: propagate error to btrfs_cmp_data_prepare caller

Omar Sandoval (1):
  Btrfs: fix incorrect {node,sector}size endianness from BTRFS_IOC_FS_INFO

Sargun Dhillon (1):
  btrfs: Report error on removing qgroup if del_qgroup_item fails

Tsutomu Itoh (1):
  Btrfs: send: fix error number for unknown inode types

satoru takeuchi (1):
  btrfs: prevent to set invalid default subvolid

 fs/btrfs/compression.c | 18 +-
 fs/btrfs/ctree.h   |  1 -
 fs/btrfs/disk-io.c |  9 -
 fs/btrfs/extent_io.c   |  8 ++--
 fs/btrfs/inode.c   | 27 ++-
 fs/btrfs/ioctl.c   | 12 
 fs/btrfs/qgroup.c  |  6 ++
 fs/btrfs/relocation.c  |  2 +-
 fs/btrfs/send.c|  2 +-
 fs/btrfs/tree-log.c| 12 ++--
 fs/btrfs/volumes.c |  2 +-
 11 files changed, 72 insertions(+), 27 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 4.13-rc3

2017-07-28 Thread David Sterba
Hi,

please pull the following btrfs fixes. They're addressing problems reported by
users, and there's one more regression fix. Thanks.

The next pull request will be sent by Chris, I'm heading off to vacation.


The following changes since commit c3cfb656307583ddfea45375c10183737593c195:

  Btrfs: fix unexpected return value of bio_readpage_error (2017-07-14 20:42:37 
+0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.13-part3

for you to fetch changes up to 0e4324a4c36b3eb5cd1f71cbbc38d888f919ebfc:

  btrfs: round down size diff when shrinking/growing device (2017-07-24 
16:05:00 +0200)


Filipe Manana (1):
  Btrfs: fix dir item validation when replaying xattr deletes

Jeff Mahoney (1):
  btrfs: fix lockup in find_free_extent with read-only block groups

Nikolay Borisov (1):
  btrfs: round down size diff when shrinking/growing device

Omar Sandoval (1):
  Btrfs: fix early ENOSPC due to delalloc

 fs/btrfs/extent-tree.c | 11 +--
 fs/btrfs/tree-log.c|  3 +--
 fs/btrfs/volumes.c |  4 ++--
 3 files changed, 8 insertions(+), 10 deletions(-)
--
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


[GIT PULL] Btrfs fixes and improvements for 4.11

2017-02-16 Thread fdmanana
From: Filipe Manana 

Hi Chris.

Please consider the following changes for the 4.11 merge window.
This time there is nothing particularly outstanding when compared to the
usual set of bug fixes. These are mostly fixes for send and the no-holes
feature introduced in 3.14. Test cases for fstests were sent for half of
these changes, with some already merged and two not yet merged.

Thanks.

The following changes since commit 6e78b3f7a193546b1c00a6d084596e774f147169:

  Btrfs: fix btrfs_decompress_buf2page() (2017-02-10 19:11:03 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
for-chris-4.11

for you to fetch changes up to 0a511ba79d7152b5b3b6b54573511fbdeb014abb:

  Btrfs: fix data loss after truncate when using the no-holes feature 
(2017-02-15 20:16:19 +)


Filipe Manana (7):
  Btrfs: incremental send, do not delay rename when parent inode is new
  Btrfs: bulk delete checksum items in the same leaf
  Btrfs: do not create explicit holes when replaying log tree if NO_HOLES 
enabled
  Btrfs: fix assertion failure when freeing block groups at close_ctree()
  Btrfs: fix use-after-free due to wrong order of destroying work queues
  Btrfs: incremental send, fix unnecessary hole writes for sparse files
  Btrfs: fix data loss after truncate when using the no-holes feature

Robbie Ko (3):
  Btrfs: send, fix failure to rename top level inode due to name collision
  Btrfs: incremental send, do not issue invalid rmdir operations
  Btrfs: fix leak of subvolume writers counter

 fs/btrfs/disk-io.c |  15 ++-
 fs/btrfs/extent-tree.c |   9 ++---
 fs/btrfs/file-item.c   |  28 +++-
 fs/btrfs/inode.c   |  29 ++---
 fs/btrfs/send.c| 125 
+++--
 fs/btrfs/tree-log.c|   5 +
 6 files changed, 181 insertions(+), 30 deletions(-)

-- 
2.7.0.rc3

--
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


[GIT PULL] Btrfs fixes

2017-01-13 Thread Chris Mason
Hi Linus,

Dave Sterba queued up a few fixes for btrfs.  I have them in my
for-linus-4.10 branch:

These are all over the place.  The tracepoint part of the pull fixes a
crash and adds a little more information to two tracepoints, while the
rest are good old fashioned fixes.

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
for-linus-4.10

Liu Bo (5) commits (+34/-11):
Btrfs: adjust outstanding_extents counter properly when dio write is split 
(+9/-2)
Btrfs: add truncated_len for ordered extent tracepoints (+4/-0)
Btrfs: use down_read_nested to make lockdep silent (+2/-1)
Btrfs: add 'inode' for extent map tracepoint (+9/-5)
Btrfs: fix lockdep warning about log_mutex (+10/-3)

David Sterba (2) commits (+80/-69):
btrfs: fix crash when tracepoint arguments are freed by wq callbacks 
(+24/-13)
btrfs: make tracepoint format strings more compact (+56/-56)

Jeff Mahoney (2) commits (+4/-1):
btrfs: fix locking when we put back a delayed ref that's too new (+1/-1)
btrfs: fix error handling when run_delayed_extent_op fails (+3/-0)

Pan Bian (1) commits (+1/-3):
btrfs: return the actual error value from  from btrfs_uuid_tree_iterate

Total: (10) commits (+119/-84)

 fs/btrfs/async-thread.c  |  15 +++--
 fs/btrfs/extent-tree.c   |   8 ++-
 fs/btrfs/inode.c |  13 +++-
 fs/btrfs/tree-log.c  |  13 +++-
 fs/btrfs/uuid-tree.c |   4 +-
 include/trace/events/btrfs.h | 146 +++
 6 files changed, 117 insertions(+), 82 deletions(-)
--
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: [GIT PULL] btrfs fixes and cleanups

2017-01-12 Thread Qu Wenruo



At 01/13/2017 12:10 AM, Liu Bo wrote:

Hi,

On Wed, Dec 28, 2016 at 05:30:59PM +0800, Qu Wenruo wrote:

Hi Liu,

At 12/15/2016 03:13 PM, Liu Bo wrote:

Hi David,

This is the collection of my patches targetting 4.10, I've
dropped patch "Btrfs: adjust len of writes if following a
preallocated extent" because of the deadlock caused by this
commit.

Patches are based on v4.9-rc8, and test against fstests with
default mount options has been taken to make sure it doesn't
break anything.

I haven't got a kernel.org git repo, so this is mainly for
tracking purpose and for testing git flow.

(cherry-pick patches might be the only way at this moment...sorry
for the inconvenience.)

Anyway, patches can be found at

https://github.com/liubogithub/btrfs-work.git for-dave

Thanks,
liubo

Liu Bo (9):
  Btrfs: add 'inode' for extent map tracepoint
  Btrfs: add truncated_len for ordered extent tracepoints
  Btrfs: use down_read_nested to make lockdep silent
  Btrfs: fix lockdep warning about log_mutex
  Btrfs: fix truncate down when no_holes feature is enabled
  Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly
  Btrfs: fix comment in btrfs_page_mkwrite
  Btrfs: clean up btrfs_ordered_update_i_size


While testing David's for-next-20161219 branch, I found btrfs/06[0-5] will
cause the following kernel panic when ran them in a row.

[ 4207.963063] assertion failed: disk_i_size < i_size, file:
fs/btrfs//ordered-data.c, line: 1041
[ 4207.963722] [ cut here ]
[ 4207.964008] kernel BUG at fs/btrfs//ctree.h:3418!
[ 4207.964008] invalid opcode:  [#1] SMP
[ 4207.964008] Modules linked in: btrfs(O) netconsole ext4 jbd2 mbcache xor
zlib_deflate raid6_pq xfs [last unloaded: btrfs]
[ 4207.964008] CPU: 0 PID: 3829 Comm: kworker/u4:5 Tainted: G O4.9.0+
#60
[ 4207.964008] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
1.10.1-20161122_114906-anatol 04/01/2014
[ 4207.964008] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs]
[ 4207.964008] task: 88000bbf8040 task.stack: c90006598000
[ 4207.964008] RIP: 0010:[]  []
assfail.constprop.10+0x1c/0x1e [btrfs]

[ 4207.964008] Call Trace:
[ 4207.964008]  [] btrfs_ordered_update_i_size+0x2b1/0x2e0
[btrfs]
[ 4207.964008]  [] btrfs_finish_ordered_io+0x335/0x6b0
[btrfs]
[ 4207.964008]  [] finish_ordered_fn+0x15/0x20 [btrfs]
[ 4207.964008]  [] btrfs_scrubparity_helper+0xef/0x610
[btrfs]
[ 4207.964008]  [] btrfs_endio_write_helper+0xe/0x10
[btrfs]
[ 4207.964008]  [] process_one_work+0x2af/0x720
[ 4207.964008]  [] ? process_one_work+0x22b/0x720
[ 4207.964008]  [] worker_thread+0x4b/0x4f0
[ 4207.964008]  [] ? process_one_work+0x720/0x720
[ 4207.964008]  [] ? process_one_work+0x720/0x720
[ 4207.964008]  [] kthread+0xf3/0x110
[ 4207.964008]  [] ? kthread_park+0x60/0x60
[ 4207.964008]  [] ret_from_fork+0x27/0x40
[ 4207.964008] Code: c7 00 e4 46 a0 48 89 e5 e8 c8 3c d8 e0 0f 0b 55 89 f1
48 c7 c2 83 90 46 a0 48 89 fe 48 c7 c7 b0 e4 46 a0 48 89 e5 e8 aa 3c d8 e0
<0f> 0b 55 89 f1 48 c7 c2 fb 90 46 a0 48 89 fe 48 c7 c7 e8 e5 46
[ 4207.964008] RIP  [] assfail.constprop.10+0x1c/0x1e
[btrfs]
[ 4207.964008]  RSP 
[ 4207.964008] ---[ end trace f7759d2fce14da9f ]---

Not sure if it's related to patch or just it exposed some bug we don't find
before.

Hopes it will help.



Thanks for spotting it, just found out that this ASSERT is not true any
more after patch "Btrfs: fix btrfs_ordered_update_i_size to update
disk_i_size properly".

I'm doing a v2 to remove it.


Glad it's not a big problem.

Thanks,
Qu



Thanks,

-liubo


Thanks,
Qu


  Btrfs: fix another race between truncate and lockless dio write

 fs/btrfs/extent-tree.c   |  3 ++-
 fs/btrfs/inode.c | 43 +++
 fs/btrfs/ordered-data.c  | 42 --
 fs/btrfs/tree-log.c  | 13 ++---
 include/trace/events/btrfs.h | 16 
 5 files changed, 83 insertions(+), 34 deletions(-)










--
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: [GIT PULL] btrfs fixes and cleanups

2017-01-12 Thread Liu Bo
Hi,

On Wed, Dec 28, 2016 at 05:30:59PM +0800, Qu Wenruo wrote:
> Hi Liu,
> 
> At 12/15/2016 03:13 PM, Liu Bo wrote:
> > Hi David,
> > 
> > This is the collection of my patches targetting 4.10, I've
> > dropped patch "Btrfs: adjust len of writes if following a
> > preallocated extent" because of the deadlock caused by this
> > commit.
> > 
> > Patches are based on v4.9-rc8, and test against fstests with
> > default mount options has been taken to make sure it doesn't
> > break anything.
> > 
> > I haven't got a kernel.org git repo, so this is mainly for
> > tracking purpose and for testing git flow.
> > 
> > (cherry-pick patches might be the only way at this moment...sorry
> > for the inconvenience.)
> > 
> > Anyway, patches can be found at
> > 
> > https://github.com/liubogithub/btrfs-work.git for-dave
> > 
> > Thanks,
> > liubo
> > 
> > Liu Bo (9):
> >   Btrfs: add 'inode' for extent map tracepoint
> >   Btrfs: add truncated_len for ordered extent tracepoints
> >   Btrfs: use down_read_nested to make lockdep silent
> >   Btrfs: fix lockdep warning about log_mutex
> >   Btrfs: fix truncate down when no_holes feature is enabled
> >   Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly
> >   Btrfs: fix comment in btrfs_page_mkwrite
> >   Btrfs: clean up btrfs_ordered_update_i_size
> 
> While testing David's for-next-20161219 branch, I found btrfs/06[0-5] will
> cause the following kernel panic when ran them in a row.
> 
> [ 4207.963063] assertion failed: disk_i_size < i_size, file:
> fs/btrfs//ordered-data.c, line: 1041
> [ 4207.963722] [ cut here ]
> [ 4207.964008] kernel BUG at fs/btrfs//ctree.h:3418!
> [ 4207.964008] invalid opcode:  [#1] SMP
> [ 4207.964008] Modules linked in: btrfs(O) netconsole ext4 jbd2 mbcache xor
> zlib_deflate raid6_pq xfs [last unloaded: btrfs]
> [ 4207.964008] CPU: 0 PID: 3829 Comm: kworker/u4:5 Tainted: G O4.9.0+
> #60
> [ 4207.964008] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
> 1.10.1-20161122_114906-anatol 04/01/2014
> [ 4207.964008] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs]
> [ 4207.964008] task: 88000bbf8040 task.stack: c90006598000
> [ 4207.964008] RIP: 0010:[]  []
> assfail.constprop.10+0x1c/0x1e [btrfs]
> 
> [ 4207.964008] Call Trace:
> [ 4207.964008]  [] btrfs_ordered_update_i_size+0x2b1/0x2e0
> [btrfs]
> [ 4207.964008]  [] btrfs_finish_ordered_io+0x335/0x6b0
> [btrfs]
> [ 4207.964008]  [] finish_ordered_fn+0x15/0x20 [btrfs]
> [ 4207.964008]  [] btrfs_scrubparity_helper+0xef/0x610
> [btrfs]
> [ 4207.964008]  [] btrfs_endio_write_helper+0xe/0x10
> [btrfs]
> [ 4207.964008]  [] process_one_work+0x2af/0x720
> [ 4207.964008]  [] ? process_one_work+0x22b/0x720
> [ 4207.964008]  [] worker_thread+0x4b/0x4f0
> [ 4207.964008]  [] ? process_one_work+0x720/0x720
> [ 4207.964008]  [] ? process_one_work+0x720/0x720
> [ 4207.964008]  [] kthread+0xf3/0x110
> [ 4207.964008]  [] ? kthread_park+0x60/0x60
> [ 4207.964008]  [] ret_from_fork+0x27/0x40
> [ 4207.964008] Code: c7 00 e4 46 a0 48 89 e5 e8 c8 3c d8 e0 0f 0b 55 89 f1
> 48 c7 c2 83 90 46 a0 48 89 fe 48 c7 c7 b0 e4 46 a0 48 89 e5 e8 aa 3c d8 e0
> <0f> 0b 55 89 f1 48 c7 c2 fb 90 46 a0 48 89 fe 48 c7 c7 e8 e5 46
> [ 4207.964008] RIP  [] assfail.constprop.10+0x1c/0x1e
> [btrfs]
> [ 4207.964008]  RSP 
> [ 4207.964008] ---[ end trace f7759d2fce14da9f ]---
> 
> Not sure if it's related to patch or just it exposed some bug we don't find
> before.
> 
> Hopes it will help.
>

Thanks for spotting it, just found out that this ASSERT is not true any
more after patch "Btrfs: fix btrfs_ordered_update_i_size to update
disk_i_size properly".

I'm doing a v2 to remove it.

Thanks,

-liubo
 
> Thanks,
> Qu
> 
> >   Btrfs: fix another race between truncate and lockless dio write
> > 
> >  fs/btrfs/extent-tree.c   |  3 ++-
> >  fs/btrfs/inode.c | 43 
> > +++
> >  fs/btrfs/ordered-data.c  | 42 
> > --
> >  fs/btrfs/tree-log.c  | 13 ++---
> >  include/trace/events/btrfs.h | 16 
> >  5 files changed, 83 insertions(+), 34 deletions(-)
> > 
> 
> 
--
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: [GIT PULL] btrfs fixes and cleanups

2016-12-28 Thread Qu Wenruo

Hi Liu,

At 12/15/2016 03:13 PM, Liu Bo wrote:

Hi David,

This is the collection of my patches targetting 4.10, I've
dropped patch "Btrfs: adjust len of writes if following a
preallocated extent" because of the deadlock caused by this
commit.

Patches are based on v4.9-rc8, and test against fstests with
default mount options has been taken to make sure it doesn't
break anything.

I haven't got a kernel.org git repo, so this is mainly for
tracking purpose and for testing git flow.

(cherry-pick patches might be the only way at this moment...sorry
for the inconvenience.)

Anyway, patches can be found at

https://github.com/liubogithub/btrfs-work.git for-dave

Thanks,
liubo

Liu Bo (9):
  Btrfs: add 'inode' for extent map tracepoint
  Btrfs: add truncated_len for ordered extent tracepoints
  Btrfs: use down_read_nested to make lockdep silent
  Btrfs: fix lockdep warning about log_mutex
  Btrfs: fix truncate down when no_holes feature is enabled
  Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly
  Btrfs: fix comment in btrfs_page_mkwrite
  Btrfs: clean up btrfs_ordered_update_i_size


While testing David's for-next-20161219 branch, I found btrfs/06[0-5] 
will cause the following kernel panic when ran them in a row.


[ 4207.963063] assertion failed: disk_i_size < i_size, file: 
fs/btrfs//ordered-data.c, line: 1041

[ 4207.963722] [ cut here ]
[ 4207.964008] kernel BUG at fs/btrfs//ctree.h:3418!
[ 4207.964008] invalid opcode:  [#1] SMP
[ 4207.964008] Modules linked in: btrfs(O) netconsole ext4 jbd2 mbcache 
xor zlib_deflate raid6_pq xfs [last unloaded: btrfs]
[ 4207.964008] CPU: 0 PID: 3829 Comm: kworker/u4:5 Tainted: G 
O4.9.0+ #60
[ 4207.964008] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 
1.10.1-20161122_114906-anatol 04/01/2014

[ 4207.964008] Workqueue: btrfs-endio-write btrfs_endio_write_helper [btrfs]
[ 4207.964008] task: 88000bbf8040 task.stack: c90006598000
[ 4207.964008] RIP: 0010:[]  [] 
assfail.constprop.10+0x1c/0x1e [btrfs]


[ 4207.964008] Call Trace:
[ 4207.964008]  [] 
btrfs_ordered_update_i_size+0x2b1/0x2e0 [btrfs]
[ 4207.964008]  [] btrfs_finish_ordered_io+0x335/0x6b0 
[btrfs]

[ 4207.964008]  [] finish_ordered_fn+0x15/0x20 [btrfs]
[ 4207.964008]  [] btrfs_scrubparity_helper+0xef/0x610 
[btrfs]
[ 4207.964008]  [] btrfs_endio_write_helper+0xe/0x10 
[btrfs]

[ 4207.964008]  [] process_one_work+0x2af/0x720
[ 4207.964008]  [] ? process_one_work+0x22b/0x720
[ 4207.964008]  [] worker_thread+0x4b/0x4f0
[ 4207.964008]  [] ? process_one_work+0x720/0x720
[ 4207.964008]  [] ? process_one_work+0x720/0x720
[ 4207.964008]  [] kthread+0xf3/0x110
[ 4207.964008]  [] ? kthread_park+0x60/0x60
[ 4207.964008]  [] ret_from_fork+0x27/0x40
[ 4207.964008] Code: c7 00 e4 46 a0 48 89 e5 e8 c8 3c d8 e0 0f 0b 55 89 
f1 48 c7 c2 83 90 46 a0 48 89 fe 48 c7 c7 b0 e4 46 a0 48 89 e5 e8 aa 3c 
d8 e0 <0f> 0b 55 89 f1 48 c7 c2 fb 90 46 a0 48 89 fe 48 c7 c7 e8 e5 46
[ 4207.964008] RIP  [] assfail.constprop.10+0x1c/0x1e 
[btrfs]

[ 4207.964008]  RSP 
[ 4207.964008] ---[ end trace f7759d2fce14da9f ]---

Not sure if it's related to patch or just it exposed some bug we don't 
find before.


Hopes it will help.

Thanks,
Qu


  Btrfs: fix another race between truncate and lockless dio write

 fs/btrfs/extent-tree.c   |  3 ++-
 fs/btrfs/inode.c | 43 +++
 fs/btrfs/ordered-data.c  | 42 --
 fs/btrfs/tree-log.c  | 13 ++---
 include/trace/events/btrfs.h | 16 
 5 files changed, 83 insertions(+), 34 deletions(-)




--
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: [GIT PULL] btrfs fixes and cleanups

2016-12-20 Thread David Sterba
On Wed, Dec 14, 2016 at 11:13:32PM -0800, Liu Bo wrote:
> This is the collection of my patches targetting 4.10, I've
> dropped patch "Btrfs: adjust len of writes if following a
> preallocated extent" because of the deadlock caused by this
> commit.
> 
> Patches are based on v4.9-rc8, and test against fstests with
> default mount options has been taken to make sure it doesn't
> break anything.
> 
> I haven't got a kernel.org git repo, so this is mainly for
> tracking purpose and for testing git flow.
> 
> (cherry-pick patches might be the only way at this moment...sorry
> for the inconvenience.)
> 
> Anyway, patches can be found at
> 
>   https://github.com/liubogithub/btrfs-work.git for-dave

Thanks, I've added this branch to my list for-next source branches. Once
the merge window is closed, your branch will be part of the published
for-next.
--
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


[GIT PULL] btrfs fixes and cleanups

2016-12-14 Thread Liu Bo
Hi David,

This is the collection of my patches targetting 4.10, I've
dropped patch "Btrfs: adjust len of writes if following a
preallocated extent" because of the deadlock caused by this
commit.

Patches are based on v4.9-rc8, and test against fstests with
default mount options has been taken to make sure it doesn't
break anything.

I haven't got a kernel.org git repo, so this is mainly for
tracking purpose and for testing git flow.

(cherry-pick patches might be the only way at this moment...sorry
for the inconvenience.)

Anyway, patches can be found at

https://github.com/liubogithub/btrfs-work.git for-dave

Thanks,
liubo

Liu Bo (9):
  Btrfs: add 'inode' for extent map tracepoint
  Btrfs: add truncated_len for ordered extent tracepoints
  Btrfs: use down_read_nested to make lockdep silent
  Btrfs: fix lockdep warning about log_mutex
  Btrfs: fix truncate down when no_holes feature is enabled
  Btrfs: fix btrfs_ordered_update_i_size to update disk_i_size properly
  Btrfs: fix comment in btrfs_page_mkwrite
  Btrfs: clean up btrfs_ordered_update_i_size
  Btrfs: fix another race between truncate and lockless dio write

 fs/btrfs/extent-tree.c   |  3 ++-
 fs/btrfs/inode.c | 43 +++
 fs/btrfs/ordered-data.c  | 42 --
 fs/btrfs/tree-log.c  | 13 ++---
 include/trace/events/btrfs.h | 16 
 5 files changed, 83 insertions(+), 34 deletions(-)

-- 
2.5.5

--
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


[GIT PULL] Btrfs fixes for 4.10

2016-11-30 Thread fdmanana
From: Filipe Manana 

Hi Chris,

Here follows a small list of fixes a couple cleanups for the 4.10 merge
window. It contains all the patches from the previous pull request (which
got unanswered nor were the changes pulled yet apparently). The most important
change is still the fix for the extent tree corruption that happens due to
balance when qgroups are enabled (a regression introduced in 4.7 by a fix for
a regression from the last qgroups rework). This has been hitting SLE and
openSUSE users and QA very badly, where transactions keep getting aborted when
running delayed references leaving the root filesystem in RO mode and nearly
unusable.
There are fixes here that allow us to run xfstests again with the integrity
checker enabled, which has been impossible since 4.8 (apparently I'm the
only one running xfstests with the integrity checker enabled, which is useful
to validate dirtied leafs, like checking if there are keys out of order, etc).
The rest are just some trivial fixes, most of them tagged for stable, and two
cleanups.

Thanks.

The following changes since commit e3597e6090ddf40904dce6d0a5a404e2c490cac6:

  Merge branch 'for-4.9-rc3' of 
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.9 
(2016-11-01 12:54:45 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
for-chris-4.10

for you to fetch changes up to 2a7bf53f577e49c43de4ffa7776056de26db65d9:

  Btrfs: fix tree search logic when replaying directory entry deletes 
(2016-11-30 16:56:12 +)


Filipe Manana (5):
  Btrfs: fix relocation incorrectly dropping data references
  Btrfs: remove unused code when creating and merging reloc trees
  Btrfs: remove rb_node field from the delayed ref node structure
  Btrfs: fix emptiness check for dirtied extent buffers at check_leaf()
  Btrfs: fix qgroup rescan worker initialization

Liu Bo (1):
  Btrfs: fix BUG_ON in btrfs_mark_buffer_dirty

Robbie Ko (3):
  Btrfs: fix enospc in hole punching
  Btrfs: fix deadlock caused by fsync when logging directory entries
  Btrfs: fix tree search logic when replaying directory entry deletes

 fs/btrfs/delayed-ref.h |  6 --
 fs/btrfs/disk-io.c | 23 +++
 fs/btrfs/file.c|  4 ++--
 fs/btrfs/qgroup.c  |  5 +
 fs/btrfs/relocation.c  | 34 --
 fs/btrfs/tree-log.c|  7 +++
 6 files changed, 37 insertions(+), 42 deletions(-)

-- 
2.7.0.rc3

--
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: [GIT PULL] Btrfs fixes for 4.8

2016-08-03 Thread Chris Mason

On 08/03/2016 06:31 AM, fdman...@kernel.org wrote:

From: Filipe Manana 

Hi Chris,

Please consider the following small set of fixes for the 4.8 kernel.
These are mostly send fixes, some of them reported and sent by Robbie Ko a
long time ago, which I reviewed, updated (specially the change logs) and
tested. All of these already have test cases in xfstests. The rest are
just some fsync related fixes and a cleanup. These have all been sent to
the mailing list before and were rebased against your 'next' branch.


Thanks Filipe!  Since these are all fixes, I'll queue up for rc2.  My 
second rc1 pull will go out today.


-chris
--
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


[GIT PULL] Btrfs fixes for 4.8

2016-08-03 Thread fdmanana
From: Filipe Manana 

Hi Chris,

Please consider the following small set of fixes for the 4.8 kernel.
These are mostly send fixes, some of them reported and sent by Robbie Ko a
long time ago, which I reviewed, updated (specially the change logs) and
tested. All of these already have test cases in xfstests. The rest are
just some fsync related fixes and a cleanup. These have all been sent to
the mailing list before and were rebased against your 'next' branch.

Thanks.

The following changes since commit 8b8b08cbfb9021af4b54b4175fc4c51d655aac8c:

  Btrfs: fix delalloc accounting after copy_from_user faults (2016-07-21 
04:03:40 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
integration-4.8

for you to fetch changes up to e6571499336e10f93a77c51a35fd1a96828eea71:

  Btrfs: remove unused function btrfs_add_delayed_qgroup_reserve() (2016-08-03 
11:02:51 +0100)


Filipe Manana (8):
  Btrfs: add missing check for writeback errors on fsync
  Btrfs: send, add missing error check for calls to path_loop()
  Btrfs: incremental send, fix invalid paths for rename operations
  Btrfs: send, avoid incorrect leaf accesses when sending utimes operations
  Btrfs: send, don't bug on inconsistent snapshots
  Btrfs: be more precise on errors when getting an inode from disk
  Btrfs: improve performance on fsync against new inode after rename/unlink
  Btrfs: remove unused function btrfs_add_delayed_qgroup_reserve()

Robbie Ko (4):
  Btrfs: send, fix failure to move directories with the same name around
  Btrfs: incremental send, fix premature rmdir operations
  Btrfs: send, fix warning due to late freeing of orphan_dir_info structures
  Btrfs: send, fix invalid leaf accesses due to incorrect utimes operations

 fs/btrfs/delayed-ref.c |  27 -
 fs/btrfs/delayed-ref.h |   3 ---
 fs/btrfs/file.c|   8 +++
 fs/btrfs/inode.c   |  46 
 fs/btrfs/send.c| 173 
+-
 fs/btrfs/tree-log.c|  85 
+++---
 6 files changed, 283 insertions(+), 59 deletions(-)

-- 
2.7.0.rc3

--
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


[GIT PULL] Btrfs fixes for 4.7

2016-05-13 Thread fdmanana
From: Filipe Manana 

Hi Chris,

Please consider the following changes for the merge window for 4.7.
There's an implementation for the rename exchange and rename whiteout
operations, from Dan Fuhry, which was originally in David's integration
branches and linux-next but then we agreed to move it into my branches
since I made a few fixes on top of it. Other than that, there's just the
usual set of bug fixes, in particular races between direct IO writes and
fsync and between direct IO writes and balance, which lead to data loss
and metadata corruption issues.
These were recently rebased just to add Reviewed-by tags from Josef and
Liu Bo, but otherwise unchanged and have been in testing for quite some
time here.

Thanks.

The following changes since commit 44549e8f5eea4e0a41b487b63e616cb089922b99:

  Linux 4.6-rc7 (2016-05-08 14:38:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git for-chris-4.7

for you to fetch changes up to 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af:

  Btrfs: add semaphore to synchronize direct IO writes with fsync (2016-05-13 
01:59:36 +0100)


Dan Fuhry (1):
  btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT

Filipe Manana (13):
  Btrfs: fix for incorrect directory entries after fsync log replay
  Btrfs: fix empty symlink after creating symlink and fsync parent dir
  Btrfs: don't wait for unrelated IO to finish before relocation
  Btrfs: don't do unnecessary delalloc flushes when relocating
  Btrfs: unpin log if rename operation fails
  Btrfs: pin log earlier when renaming
  Btrfs: fix inode leak on failure to setup whiteout inode in rename
  Btrfs: unpin logs if rename exchange operation fails
  Btrfs: pin logs earlier when doing a rename exchange operation
  Btrfs: fix number of transaction units for renames with whiteout
  Btrfs: fix race between fsync and direct IO writes for prealloc extents
  Btrfs: fix race between block group relocation and nocow writes
  Btrfs: add semaphore to synchronize direct IO writes with fsync

 fs/btrfs/btrfs_inode.h  |  10 +++
 fs/btrfs/ctree.h|  27 
 fs/btrfs/dev-replace.c  |   4 +-
 fs/btrfs/extent-tree.c  | 122 +--
 fs/btrfs/inode.c| 464 
+++---
 fs/btrfs/ioctl.c|   2 +-
 fs/btrfs/ordered-data.c |  26 +---
 fs/btrfs/ordered-data.h |   6 +-
 fs/btrfs/relocation.c   |  11 ++--
 fs/btrfs/super.c|   2 +-
 fs/btrfs/transaction.c  |   2 +-
 fs/btrfs/tree-log.c |  66 +++
 12 files changed, 608 insertions(+), 134 deletions(-)
-- 
2.7.0.rc3

--
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: [GIT PULL] Btrfs fixes for 4.6

2016-03-01 Thread Chris Mason
On Wed, Mar 02, 2016 at 09:24:46AM +0800, Qu Wenruo wrote:
> 
> 
> Chris Mason wrote on 2016/03/01 20:11 -0500:
> >On Wed, Mar 02, 2016 at 08:48:06AM +0800, Qu Wenruo wrote:
> >>
> >>
> >>Chris Mason wrote on 2016/03/01 11:06 -0500:
> >>>On Tue, Mar 01, 2016 at 10:20:26AM +0100, David Sterba wrote:
> Hi Chris,
> 
> On Fri, Feb 26, 2016 at 01:22:00PM +, fdman...@kernel.org wrote:
> >The following changes since commit 
> >0fcb760afa6103419800674e22fb7f4de1f9670b:
> >
> >   Merge branch 'for-next' of 
> > git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into 
> > for-linus-4.6 (2016-02-24 10:21:44 -0800)
> >
> >are available in the git repository at:
> >
> >   git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
> > integration-4.6
> >
> >for you to fetch changes up to 97c86c11a5cb9839609a9df195e998c3312e68b0:
> >
> >   Btrfs: do not collect ordered extents when logging that inode exists 
> > (2016-02-26 04:28:15 +)
> 
> Filipe's branch is based on some integration snapshot that contains the
> 'delete device by id' patchset that was removed from the 4.6 queue.
> 
> Your branch 'next' merges it back again through Filipe's tree, besides
> that the merge commits of the topic branches in my for-next appear
> twice. While the duplicated commits are only an esthetic issue, the
> extra branch bothers me.
> 
> I don't see a nice way how to avoid rebases in this cases. My suggestion
> is that Filipe rebases the branch on my for-chris that could have been
> an integration at some point.
> 
> As we're merging our branches that way for the first time I'd like to
> find the workflow also for the next dev cycles so I'm open to other
> suggestions.
> >>>
> >>>Ugh, thanks Dave I missed this.  I'll rebase Filipe on top of your
> >>>branch.  The easiest way to avoid it in general is to only base trees on
> >>>top of things already in Linus' tree.  If there are specific
> >>>dependencies we can work it out on a case by case basis, but the merge
> >>>conflicts are almost always trivial.
> >>>
> >>>-chris
> >>
> >>Although off-topic, but do we need to rebase all sent pull to the new
> >>integration-4.6?
> >
> >Unless there are huge conflicts, it's actually much easier to base
> >against a recent v4.5-rcN.  That way if we do have to rebase the
> >integration branch, it doesn't mess up your pull request.
> >
> >If there are small conflicts, I can just deal with them when I pull.
> >For bigger conflicts, I'll either rebase on top of integration as
> >individual patches, or ask for help ;)
> 
> Thanks for the tip.
> Seems git can handle them well. (yeah, no more patch bombing )

Please keep patch bombing ;)  It's the best way to get things reviewed.
Besides, if people didn't like email, they would have found different
jobs long ago ;)

-chris
--
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: [GIT PULL] Btrfs fixes for 4.6

2016-03-01 Thread Qu Wenruo



Chris Mason wrote on 2016/03/01 20:11 -0500:

On Wed, Mar 02, 2016 at 08:48:06AM +0800, Qu Wenruo wrote:



Chris Mason wrote on 2016/03/01 11:06 -0500:

On Tue, Mar 01, 2016 at 10:20:26AM +0100, David Sterba wrote:

Hi Chris,

On Fri, Feb 26, 2016 at 01:22:00PM +, fdman...@kernel.org wrote:

The following changes since commit 0fcb760afa6103419800674e22fb7f4de1f9670b:

   Merge branch 'for-next' of 
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6 
(2016-02-24 10:21:44 -0800)

are available in the git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
integration-4.6

for you to fetch changes up to 97c86c11a5cb9839609a9df195e998c3312e68b0:

   Btrfs: do not collect ordered extents when logging that inode exists 
(2016-02-26 04:28:15 +)


Filipe's branch is based on some integration snapshot that contains the
'delete device by id' patchset that was removed from the 4.6 queue.

Your branch 'next' merges it back again through Filipe's tree, besides
that the merge commits of the topic branches in my for-next appear
twice. While the duplicated commits are only an esthetic issue, the
extra branch bothers me.

I don't see a nice way how to avoid rebases in this cases. My suggestion
is that Filipe rebases the branch on my for-chris that could have been
an integration at some point.

As we're merging our branches that way for the first time I'd like to
find the workflow also for the next dev cycles so I'm open to other
suggestions.


Ugh, thanks Dave I missed this.  I'll rebase Filipe on top of your
branch.  The easiest way to avoid it in general is to only base trees on
top of things already in Linus' tree.  If there are specific
dependencies we can work it out on a case by case basis, but the merge
conflicts are almost always trivial.

-chris


Although off-topic, but do we need to rebase all sent pull to the new
integration-4.6?


Unless there are huge conflicts, it's actually much easier to base
against a recent v4.5-rcN.  That way if we do have to rebase the
integration branch, it doesn't mess up your pull request.

If there are small conflicts, I can just deal with them when I pull.
For bigger conflicts, I'll either rebase on top of integration as
individual patches, or ask for help ;)


Thanks for the tip.
Seems git can handle them well. (yeah, no more patch bombing )




Yes, I mean the in-band de-dup patchset. (If it is going to be merged)


For de-dup, I need to sit down and spend some more time reviewing it.  I
know it's taking a long time, but I want to make sure we get the disk
format right up front.  Lets target v4.7.


OK, I'll ensure no more modification to the existing patchset for easier 
review.


Although we will continue adding minor features like compression with 
dedup or ioctl improvement, so I'm afraid we'll continue bombing mail 
list with 20+ patches. :)


Thanks,
Qu


-chris





--
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: [GIT PULL] Btrfs fixes for 4.6

2016-03-01 Thread Chris Mason
On Wed, Mar 02, 2016 at 08:48:06AM +0800, Qu Wenruo wrote:
> 
> 
> Chris Mason wrote on 2016/03/01 11:06 -0500:
> >On Tue, Mar 01, 2016 at 10:20:26AM +0100, David Sterba wrote:
> >>Hi Chris,
> >>
> >>On Fri, Feb 26, 2016 at 01:22:00PM +, fdman...@kernel.org wrote:
> >>>The following changes since commit 
> >>>0fcb760afa6103419800674e22fb7f4de1f9670b:
> >>>
> >>>   Merge branch 'for-next' of 
> >>> git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into 
> >>> for-linus-4.6 (2016-02-24 10:21:44 -0800)
> >>>
> >>>are available in the git repository at:
> >>>
> >>>   git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
> >>> integration-4.6
> >>>
> >>>for you to fetch changes up to 97c86c11a5cb9839609a9df195e998c3312e68b0:
> >>>
> >>>   Btrfs: do not collect ordered extents when logging that inode exists 
> >>> (2016-02-26 04:28:15 +)
> >>
> >>Filipe's branch is based on some integration snapshot that contains the
> >>'delete device by id' patchset that was removed from the 4.6 queue.
> >>
> >>Your branch 'next' merges it back again through Filipe's tree, besides
> >>that the merge commits of the topic branches in my for-next appear
> >>twice. While the duplicated commits are only an esthetic issue, the
> >>extra branch bothers me.
> >>
> >>I don't see a nice way how to avoid rebases in this cases. My suggestion
> >>is that Filipe rebases the branch on my for-chris that could have been
> >>an integration at some point.
> >>
> >>As we're merging our branches that way for the first time I'd like to
> >>find the workflow also for the next dev cycles so I'm open to other
> >>suggestions.
> >
> >Ugh, thanks Dave I missed this.  I'll rebase Filipe on top of your
> >branch.  The easiest way to avoid it in general is to only base trees on
> >top of things already in Linus' tree.  If there are specific
> >dependencies we can work it out on a case by case basis, but the merge
> >conflicts are almost always trivial.
> >
> >-chris
> 
> Although off-topic, but do we need to rebase all sent pull to the new
> integration-4.6?

Unless there are huge conflicts, it's actually much easier to base
against a recent v4.5-rcN.  That way if we do have to rebase the
integration branch, it doesn't mess up your pull request.

If there are small conflicts, I can just deal with them when I pull.
For bigger conflicts, I'll either rebase on top of integration as
individual patches, or ask for help ;)

> Yes, I mean the in-band de-dup patchset. (If it is going to be merged)

For de-dup, I need to sit down and spend some more time reviewing it.  I
know it's taking a long time, but I want to make sure we get the disk
format right up front.  Lets target v4.7.

-chris
--
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: [GIT PULL] Btrfs fixes for 4.6

2016-03-01 Thread Qu Wenruo



Chris Mason wrote on 2016/03/01 11:06 -0500:

On Tue, Mar 01, 2016 at 10:20:26AM +0100, David Sterba wrote:

Hi Chris,

On Fri, Feb 26, 2016 at 01:22:00PM +, fdman...@kernel.org wrote:

The following changes since commit 0fcb760afa6103419800674e22fb7f4de1f9670b:

   Merge branch 'for-next' of 
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6 
(2016-02-24 10:21:44 -0800)

are available in the git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
integration-4.6

for you to fetch changes up to 97c86c11a5cb9839609a9df195e998c3312e68b0:

   Btrfs: do not collect ordered extents when logging that inode exists 
(2016-02-26 04:28:15 +)


Filipe's branch is based on some integration snapshot that contains the
'delete device by id' patchset that was removed from the 4.6 queue.

Your branch 'next' merges it back again through Filipe's tree, besides
that the merge commits of the topic branches in my for-next appear
twice. While the duplicated commits are only an esthetic issue, the
extra branch bothers me.

I don't see a nice way how to avoid rebases in this cases. My suggestion
is that Filipe rebases the branch on my for-chris that could have been
an integration at some point.

As we're merging our branches that way for the first time I'd like to
find the workflow also for the next dev cycles so I'm open to other
suggestions.


Ugh, thanks Dave I missed this.  I'll rebase Filipe on top of your
branch.  The easiest way to avoid it in general is to only base trees on
top of things already in Linus' tree.  If there are specific
dependencies we can work it out on a case by case basis, but the merge
conflicts are almost always trivial.

-chris


Although off-topic, but do we need to rebase all sent pull to the new 
integration-4.6?

Yes, I mean the in-band de-dup patchset. (If it is going to be merged)

Thanks,
Qu

--
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





--
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: [GIT PULL] Btrfs fixes for 4.6

2016-03-01 Thread Chris Mason
On Tue, Mar 01, 2016 at 10:20:26AM +0100, David Sterba wrote:
> Hi Chris,
> 
> On Fri, Feb 26, 2016 at 01:22:00PM +, fdman...@kernel.org wrote:
> > The following changes since commit 0fcb760afa6103419800674e22fb7f4de1f9670b:
> > 
> >   Merge branch 'for-next' of 
> > git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into 
> > for-linus-4.6 (2016-02-24 10:21:44 -0800)
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
> > integration-4.6
> > 
> > for you to fetch changes up to 97c86c11a5cb9839609a9df195e998c3312e68b0:
> > 
> >   Btrfs: do not collect ordered extents when logging that inode exists 
> > (2016-02-26 04:28:15 +)
> 
> Filipe's branch is based on some integration snapshot that contains the
> 'delete device by id' patchset that was removed from the 4.6 queue.
> 
> Your branch 'next' merges it back again through Filipe's tree, besides
> that the merge commits of the topic branches in my for-next appear
> twice. While the duplicated commits are only an esthetic issue, the
> extra branch bothers me.
> 
> I don't see a nice way how to avoid rebases in this cases. My suggestion
> is that Filipe rebases the branch on my for-chris that could have been
> an integration at some point.
> 
> As we're merging our branches that way for the first time I'd like to
> find the workflow also for the next dev cycles so I'm open to other
> suggestions.

Ugh, thanks Dave I missed this.  I'll rebase Filipe on top of your
branch.  The easiest way to avoid it in general is to only base trees on
top of things already in Linus' tree.  If there are specific
dependencies we can work it out on a case by case basis, but the merge
conflicts are almost always trivial.

-chris
--
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: [GIT PULL] Btrfs fixes for 4.6

2016-03-01 Thread David Sterba
Hi Chris,

On Fri, Feb 26, 2016 at 01:22:00PM +, fdman...@kernel.org wrote:
> The following changes since commit 0fcb760afa6103419800674e22fb7f4de1f9670b:
> 
>   Merge branch 'for-next' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6 
> (2016-02-24 10:21:44 -0800)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
> integration-4.6
> 
> for you to fetch changes up to 97c86c11a5cb9839609a9df195e998c3312e68b0:
> 
>   Btrfs: do not collect ordered extents when logging that inode exists 
> (2016-02-26 04:28:15 +)

Filipe's branch is based on some integration snapshot that contains the
'delete device by id' patchset that was removed from the 4.6 queue.

Your branch 'next' merges it back again through Filipe's tree, besides
that the merge commits of the topic branches in my for-next appear
twice. While the duplicated commits are only an esthetic issue, the
extra branch bothers me.

I don't see a nice way how to avoid rebases in this cases. My suggestion
is that Filipe rebases the branch on my for-chris that could have been
an integration at some point.

As we're merging our branches that way for the first time I'd like to
find the workflow also for the next dev cycles so I'm open to other
suggestions.
--
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


[GIT PULL] Btrfs fixes for 4.6

2016-02-26 Thread fdmanana
From: Filipe Manana 

Hi Chris,

Please consider the following changes for the 4.6 kernel merge window.
Nothing particularly outstanding, just the usual sort of bug fixes.
These have all been sent to the mailing list before (I just changed in
my repo the changelog for the deadlock fix patch to fix a typo pointed
by Liu Bo, other than that it's exactly the same as the version sent to
the mailing list). Some xfstests for these were already merged upstream
and one more sent earlier this week (for the listxattrs issue) that is
not yet merged.

Thanks.

The following changes since commit 0fcb760afa6103419800674e22fb7f4de1f9670b:

  Merge branch 'for-next' of 
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6 
(2016-02-24 10:21:44 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
integration-4.6

for you to fetch changes up to 97c86c11a5cb9839609a9df195e998c3312e68b0:

  Btrfs: do not collect ordered extents when logging that inode exists 
(2016-02-26 04:28:15 +)


Filipe Manana (7):
  Btrfs: fix unreplayable log after snapshot delete + parent dir fsync
  Btrfs: fix file loss on log replay after renaming a file and fsync
  Btrfs: fix extent_same allowing destination offset beyond i_size
  Btrfs: fix deadlock between direct IO reads and buffered writes
  Btrfs: fix listxattrs not listing all xattrs packed in the same item
  Btrfs: fix race when checking if we can skip fsync'ing an inode
  Btrfs: do not collect ordered extents when logging that inode exists

 fs/btrfs/file.c |  9 +
 fs/btrfs/inode.c| 25 +++--
 fs/btrfs/ioctl.c|  6 ++
 fs/btrfs/tree-log.c | 99 
---
 fs/btrfs/tree-log.h |  2 ++
 fs/btrfs/xattr.c| 65 
+
 6 files changed, 165 insertions(+), 41 deletions(-)

-- 
2.7.0.rc3

--
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: [GIT PULL] Btrfs fixes for 4.4

2015-12-16 Thread Chris Mason
On Thu, Dec 10, 2015 at 11:44:50AM +, fdman...@kernel.org wrote:
> From: Filipe Manana 
> 
> Hi Chris,
> 
> Please consider the following fixes for kernel 4.4. Two of them are fixes
> to new issues introduced in the 4.4 merge window and 4.4 release candidates.
> The other one just fixes a warning message that is confusing and has made
> several users wonder if they are supposed to do anything or not when we
> fail to read a space cache.
> All these fixes have been previously sent to the mailing list.

Thanks Filipe, I tested these and pushed out, along with my two from
this week.

-chris
--
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


[GIT PULL] Btrfs fixes for 4.4

2015-12-10 Thread fdmanana
From: Filipe Manana 

Hi Chris,

Please consider the following fixes for kernel 4.4. Two of them are fixes
to new issues introduced in the 4.4 merge window and 4.4 release candidates.
The other one just fixes a warning message that is confusing and has made
several users wonder if they are supposed to do anything or not when we
fail to read a space cache.
All these fixes have been previously sent to the mailing list.

Thanks.

The following changes since commit dba72cb30b6a4811038128c8a98b268d18ca60fe:

  btrfs: fix balance range usage filters in 4.4-rc (2015-11-25 05:27:33 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git for-chris-4.4

for you to fetch changes up to 94356889c404faf050895099fd0d23f8bef118c4:

  btrfs: fix misleading warning when space cache failed to load (2015-12-10 
11:38:08 +)


Filipe Manana (2):
  Btrfs: fix unprotected list move from unused_bgs to deleted_bgs list
  Btrfs: fix transaction handle leak in balance

Holger Hoffstätte (1):
  btrfs: fix misleading warning when space cache failed to load

 fs/btrfs/extent-tree.c  | 10 +++---
 fs/btrfs/free-space-cache.c |  2 +-
 fs/btrfs/transaction.c  |  1 -
 fs/btrfs/transaction.h  |  2 +-
 fs/btrfs/volumes.c  |  3 +--
 5 files changed, 10 insertions(+), 8 deletions(-)

-- 
2.1.3

--
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


[GIT PULL] Btrfs fixes

2015-11-05 Thread fdmanana
From: Filipe Manana 

Hi Chris,

please consider the following fixes for the 4.4 merge window (they were
all previously sent to the mailing list already).

One fixes a sleep inside atomic context issue, introduced by one patch
in the integration-4.4 branch. Another two fix races regarding waiting
for qgroup rescan worker to finish and a race between the qgroup rescan
worker and unmounting the filesystem (leading to crashes). The remaining
patch fixes an issue with partial direct IO writes, which has been
introduced in the 4.0 kernel, and results either in an assertion failure
(BUG_ON) when CONFIG_BTRFS_ASSERT=y or arithmetic underflow of an inode's
outstanding extents counter (used for proper space reservation) when
assertions are disabled.

Two test cases for fstests were sent recently to cover the issues regarding
the races and the direct IO partial write regression.

Thanks.

The following changes since commit 2959a32a858a2c44bbbce83d19c158d54cc5998a:

  Btrfs: fix hole punching when using the no-holes feature (2015-11-03 07:44:20 
-0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
integration-4.4

for you to fetch changes up to 3b2ba7b31d56c3d8f57cd5d32b8fb5101ab446e4:

  Btrfs: fix sleeping inside atomic context in qgroup rescan worker (2015-11-05 
11:02:22 +)


Filipe Manana (3):
  Btrfs: fix extent accounting for partial direct IO writes
  Btrfs: fix race waiting for qgroup rescan worker
  Btrfs: fix sleeping inside atomic context in qgroup rescan worker

Justin Maggard (1):
  btrfs: qgroup: exit the rescan worker during umount

 fs/btrfs/disk-io.c |  3 +++
 fs/btrfs/inode.c   | 52 +---
 fs/btrfs/qgroup.c  | 13 +++--
 3 files changed, 47 insertions(+), 21 deletions(-)

-- 
2.1.3

--
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: [GIT PULL] Btrfs fixes

2015-11-05 Thread Chris Mason
On Thu, Nov 05, 2015 at 11:20:37AM +, fdman...@kernel.org wrote:
> From: Filipe Manana 
> 
> Hi Chris,
> 
> please consider the following fixes for the 4.4 merge window (they were
> all previously sent to the mailing list already).
> 
> One fixes a sleep inside atomic context issue, introduced by one patch
> in the integration-4.4 branch. Another two fix races regarding waiting
> for qgroup rescan worker to finish and a race between the qgroup rescan
> worker and unmounting the filesystem (leading to crashes). The remaining
> patch fixes an issue with partial direct IO writes, which has been
> introduced in the 4.0 kernel, and results either in an assertion failure
> (BUG_ON) when CONFIG_BTRFS_ASSERT=y or arithmetic underflow of an inode's
> outstanding extents counter (used for proper space reservation) when
> assertions are disabled.
> 
> Two test cases for fstests were sent recently to cover the issues regarding
> the races and the direct IO partial write regression.

Great, thanks Filipe.

I'll send these for my second pull (probably next Wed).

-chris
--
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


[GIT PULL] Btrfs fixes for delayed refs regression and a deadlock

2015-10-26 Thread fdmanana
From: Filipe Manana 

Hi Chris,

please consider the following fixes for the 4.4 merge window (they were
previously sent to the mailing list already). They fix an issue with
delayed references that makes us hit some BUG_ONs as of the 4.2 kernel
release.

A lot of people have been hitting this and reported it in the mailing
list and bugzilla. For at least some of them this has been making it
impossible to run a balance on a 4.2+ kernel, such as Stéphane's case
on his multi terabyte filesystem.

I've tagged both for stable and included review tags that people gave
through the mailing list.

A very special thanks to Stéphane Lesimple for volunteering not only
to test these fixes (balance took over 1 day to complete on his fs!)
but also debug patches to help me figure out what was leading to the
crashes. Not only balance finishes successfully for him now, but fsck
also does not report any inconsistencies and his filesystem seems
healthy (his files, snapshots, etc, seem all ok).

As a bonus, the second patch also ends up fixing a deadlock in the clone
ioctl when qgroups are enabled (reported by Elias Probst in the mailing
list).

Thanks.

The following changes since commit a9e6d153563d2ed69c6cd7fb4fa5ce4ca7c712eb:

  Merge branch 'allocator-fixes' into for-linus-4.4 (2015-10-21 19:00:38 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
delayed-refs-balance-fix-4.4

for you to fetch changes up to b06c4bf5c874a57254b197f53ddf588e7a24a2bf:

  Btrfs: fix regression running delayed references when using qgroups 
(2015-10-25 19:53:26 +)


Filipe Manana (2):
  Btrfs: fix regression when running delayed references
  Btrfs: fix regression running delayed references when using qgroups

 fs/btrfs/ctree.h   |   4 ++--
 fs/btrfs/delayed-ref.c | 139 
---
 fs/btrfs/delayed-ref.h |   7 ++-
 fs/btrfs/extent-tree.c |  59 
++-
 fs/btrfs/file.c|  10 +-
 fs/btrfs/inode.c   |   4 ++--
 fs/btrfs/ioctl.c   |  62 
+-
 fs/btrfs/relocation.c  |  16 +++-
 fs/btrfs/tree-log.c|   2 +-
 9 files changed, 170 insertions(+), 133 deletions(-)

-- 
2.1.3

--
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


[GIT PULL] Btrfs fixes for 4.4 integration branch

2015-10-15 Thread fdmanana
From: Filipe Manana 

Hi Chris.

Please consider the bug fixes listed below for the linux kernel 4.4 merge
window (they were all previously sent to the mailing list).

Robin Ruede found and fixed a regression in send that was introduced by a
commit added to the 4.2 kernel release (a few other people reported this
regression too).

There's also a small fix for reading a page through the extent_same ioctl
when the page belongs to a file hole.

Finally we have two data corruption/data loss fixes, one for send/receive
and the other for the clone ioctl. Both issues have been around for a long
time, since the very first commits that introduced send/receive and the
clone ioctl.

I have tagged Robin's fix and the clone ioctl fix for stable, but not the
one for the send/receive data corruption because it's quite a large change
(stable backport rules forbid such large changes).

I have sent test cases for xfstests for these corruption/data loss fixes
and the send regression (as well as for the scenario that the offending
commit fixed). They have all been merged upstream already:

  0e6ead559169260d0a2621ec22edcd0e63b84a88 btrfs/035: check for data loss
  ddb4e4cfccfa5fc36975c12e9a66a24d3b7829bd btrfs: test for cloning of inline 
extents
  be6122971fa08146ee531f84a7553aa15e2b63ec btrfs: test sending snapshots 
received from other filesystems
  a2bfff4d6cc85af4a6403371b38cf720447c8be9 btrfs: send/receive across different 
filesystems
  71d8215c197819bdccc3aa3658b59e09660133f9 btrfs: send with shared and 
compressed extents
  f1b304ab9796458a076c7e22ce983c5bef0f16f4 fstests: test btrfs send for 
reflinked files

Thanks.

The following changes since commit 6db4a7335dd701a0e20275440ee057d3db2a7ae3:

  Merge branch 'fix/waitqueue-barriers' of 
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.4 
(2015-10-12 16:24:40 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
integration-4.4

for you to fetch changes up to 5e6ecb362bd5950a3d8ce19c32829e4f8c7917d9:

  Btrfs: fix double range unlock of hole region when reading page (2015-10-14 
04:37:00 +0100)


Filipe Manana (3):
  Btrfs: send, fix file corruption due to incorrect cloning operations
  Btrfs: fix file corruption and data loss after cloning inline extents
  Btrfs: fix double range unlock of hole region when reading page

Robin Ruede (1):
  btrfs: fix resending received snapshot with parent

 fs/btrfs/extent_io.c |   8 --
 fs/btrfs/ioctl.c | 195 

 fs/btrfs/send.c  | 210 
++--
 3 files changed, 339 insertions(+), 74 deletions(-)

-- 
2.1.3

--
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


[GIT PULL] Btrfs fixes for integration-4.3

2015-08-19 Thread fdmanana
From: Filipe Manana fdman...@suse.com

Hi Chris,

Please consider the following fixes for your integration-4.3 branch.
Nothing unusual. I included any Reviewed-by tags people added and a
test case for xfstests for the file corruption after fsync fix.

Thanks.

The following changes since commit 46cd28555ffaa40162290dba203daad0ff6f7abd:

  Merge branch 'jeffm-discard-4.3' into for-linus-4.3 (2015-08-09 07:35:33 
-0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux.git 
integration-4.3

for you to fetch changes up to 477594f93c43b1ee685f085f437293758cf3f581:

  Btrfs: fix file read corruption after extent cloning and fsync (2015-08-19 
19:26:37 +0100)


Filipe Manana (2):
  Btrfs: check if previous transaction aborted to avoid fs corruption
  Btrfs: fix file read corruption after extent cloning and fsync

 fs/btrfs/transaction.c |  3 +++
 fs/btrfs/tree-log.c| 54 
++
 2 files changed, 57 insertions(+)

-- 
2.1.3

--
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: [GIT PULL] Btrfs fixes for integration-4.3

2015-08-19 Thread Chris Mason
On Wed, Aug 19, 2015 at 07:37:42PM +0100, fdman...@kernel.org wrote:
 From: Filipe Manana fdman...@suse.com
 
 Hi Chris,
 
 Please consider the following fixes for your integration-4.3 branch.
 Nothing unusual. I included any Reviewed-by tags people added and a
 test case for xfstests for the file corruption after fsync fix.

Thanks Filipe, pulled.

-chris
--
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


[GIT PULL] Btrfs fixes

2015-05-15 Thread Chris Mason
Hi Linus,

I have a few more fixes in my for-linus-4.1 branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
for-linus-4.1

The first commit is a fix from Filipe for a very old extent buffer reuse
race that triggered a BUG_ON.  It hasn't come up often, I looked through
old logs at FB and we hit it a handful of times over the last year.

The rest are other corners he hit during testing

Filipe Manana (4) commits (+68/-10):
Btrfs: fix race when reusing stale extent buffers that leads to BUG_ON 
(+19/-0)
Btrfs: fix race between block group creation and their cache writeout 
(+27/-4)
Btrfs: fix panic when starting bg cache writeout after IO error (+10/-4)
Btrfs: fix crash after inode cache writeback failure (+12/-2)

Total: (4) commits

 fs/btrfs/extent-tree.c  | 31 +++
 fs/btrfs/extent_io.c| 19 +++
 fs/btrfs/free-space-cache.c | 14 --
 fs/btrfs/ordered-data.c | 14 ++
 4 files changed, 68 insertions(+), 10 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2015-04-26 Thread Chris Mason

Hi Linus,

Filipe hit two problems in my block group cache patches.  We finalized
the fixes last week and ran through more tests.

Can you please pull:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
for-linus-4.1

Chris Mason (2) commits (+25/-17):
Btrfs: prevent list corruption during free space cache processing (+18/-14)
Btrfs: fix inode cache writeout (+7/-3)

Total: (2) commits (+25/-17)

 fs/btrfs/free-space-cache.c | 42 +-
 1 file changed, 25 insertions(+), 17 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2015-03-20 Thread Chris Mason
Hi Linus,

Please grab my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Most of these are fixing extent reservation accounting, or corners with
tree writeback during commit.  Josef's set does add a test, which isn't
strictly a fix, but it'll keep us from making this same mistake again.

Josef Bacik (8) commits (+349/-46):
Btrfs: account for the correct number of extents for delalloc reservations 
(+5/-1)
Btrfs: add sanity test for outstanding_extents accounting (+217/-1)
Btrfs: fix ASSERT(list_empty(cur_trans-dirty_bgs_list) (+18/-13)
Btrfs: fix outstanding_extents accounting in DIO (+35/-2)
Btrfs: prepare block group cache before writing (+32/-1)
Btrfs: account merges/splits properly (+30/-27)
Btrfs: just free dummy extent buffers (+6/-0)
Btrfs: fix merge delalloc logic (+6/-1)

Liu Bo (2) commits (+4/-1):
Btrfs: catch transaction abortion after waiting for it (+3/-0)
Btrfs: fix comp_oper to get right order (+1/-1)

Fabian Frederick (1) commits (+1/-1):
btrfs: fix sizeof format specifier in btrfs_check_super_valid()

Total: (11) commits (+354/-48)

 fs/btrfs/ctree.h |   5 ++
 fs/btrfs/disk-io.c   |   2 +-
 fs/btrfs/extent-tree.c   |  35 +++-
 fs/btrfs/extent_io.c |   6 ++
 fs/btrfs/inode.c | 112 ++--
 fs/btrfs/qgroup.c|   2 +-
 fs/btrfs/tests/inode-tests.c | 197 ++-
 fs/btrfs/transaction.c   |  39 ++---
 8 files changed, 352 insertions(+), 46 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2015-01-08 Thread Chris Mason
Hi Linus,

We have a small queue of btrfs fixes in my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

None of these are huge, but my commit does fix a regression from 3.18
that could cause lost files during log replay.

This also adds Dave Sterba to the list of Btrfs maintainers.  It doesn't
mean we're doing things differently, but Dave has really been helping
with the maintainer workload for years.

Chris Mason (2) commits (+9/-0):
Btrfs: don't delay inode ref updates during log replay (+8/-0)
Btrfs: add more maintainers (+1/-0)

Wang Shilong (1) commits (+3/-1):
Btrfs: call inode_dec_link_count() on mkdir error path

Filipe Manana (1) commits (+10/-3):
Btrfs: correctly get tree level in tree_backref_for_extent

Josef Bacik (1) commits (+6/-6):
Btrfs: abort transaction if we don't find the block group

Dan Carpenter (1) commits (+1/-1):
Btrfs, scrub: uninitialized variable in scrub_extent_for_parity()

Total: (6) commits (+29/-11)

 MAINTAINERS  |  1 +
 fs/btrfs/backref.c   | 13 ++---
 fs/btrfs/delayed-inode.c |  8 
 fs/btrfs/extent-tree.c   | 12 ++--
 fs/btrfs/inode.c |  4 +++-
 fs/btrfs/scrub.c |  2 +-
 6 files changed, 29 insertions(+), 11 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2014-11-01 Thread Chris Mason

Hi Linus,

We have a few fixes in my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Filipe is nailing down some problems with our skinny extent variation,
and Dave's patch fixes endian problems in the new super block checks.

Filipe Manana (2) commits (+4/-18):
Btrfs: fix race that makes btrfs_lookup_extent_info miss skinny extent 
items (+0/-8)
Btrfs: fix invalid leaf slot access in btrfs_lookup_extent() (+4/-10)

Josef Bacik (1) commits (+1/-0):
Btrfs: properly clean up btrfs_end_io_wq_cache

David Sterba (1) commits (+22/-21):
btrfs: use macro accessors in superblock validation checks

Total: (4) commits (+27/-39)

 fs/btrfs/ctree.h   |  2 +-
 fs/btrfs/disk-io.c | 43 ++-
 fs/btrfs/extent-tree.c | 18 ++
 fs/btrfs/super.c   |  1 +
 fs/btrfs/tree-log.c|  2 +-
 5 files changed, 27 insertions(+), 39 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2014-09-19 Thread Chris Mason
Hi Linus,

We have two more fixes for pulling:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

I've got a  revert to fix a regression with btrfs device registration,
and Filipe has part two of his fsync fix from last week.

Chris Mason (1) commits (+6/-7):
Revert Btrfs: device_list_add() should not update list when mounted

Filipe Manana (1) commits (+13/-14):
Btrfs: set inode's logged_trans/last_log_commit after ranged fsync

Total: (2) commits (+19/-21)

 fs/btrfs/btrfs_inode.h | 13 +++--
 fs/btrfs/tree-log.c| 14 ++
 fs/btrfs/volumes.c | 13 ++---
 3 files changed, 19 insertions(+), 21 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2013-03-17 Thread Chris Mason
Hi Linus,

My for-linus branch has some btrfs fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Eric's rcu barrier patch fixes a long standing problem with our unmount
code hanging on to devices in workqueue helpers.  Liu Bo nailed down a
difficult assertion for in-memory extent mappings.

Liu Bo (4) commits (+9/-7):
Btrfs: get better concurrency for snapshot-aware defrag work (+3/-0)
Btrfs: fix warning when creating snapshots (+5/-6)
Btrfs: fix warning of free_extent_map (+1/-0)
Btrfs: remove btrfs_try_spin_lock (+0/-1)

Josef Bacik (1) commits (+4/-1):
Btrfs: return EIO if we have extent tree corruption

Eric Sandeen (1) commits (+6/-0):
btrfs: use rcu_barrier() to wait for bdev puts at unmount

Wang Shilong (1) commits (+6/-4):
Btrfs: return as soon as possible when edquot happens

Total: (7) commits (+25/-12)

 fs/btrfs/extent-tree.c |  5 -
 fs/btrfs/file.c|  1 +
 fs/btrfs/inode.c   |  3 +++
 fs/btrfs/locking.h |  1 -
 fs/btrfs/qgroup.c  | 10 ++
 fs/btrfs/transaction.c | 11 +--
 fs/btrfs/volumes.c |  6 ++
 7 files changed, 25 insertions(+), 12 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2013-02-06 Thread Chris Mason
Hi Linus,

Please pull my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

We've got corner cases for updating i_size that ceph was hitting, error
handling for quotas when we run out of space, a very subtle snapshot
deletion race, a crash while removing devices, and one deadlock between
subvolume creation and the sb_internal code (thanks lockdep).

Josef Bacik (3) commits (+12/-4):
Btrfs: do not merge logged extents if we've removed them from the tree 
(+2/-1)
Btrfs: fix possible stale data exposure (+1/-1)
Btrfs: fix missing i_size update (+9/-2)

Miao Xie (2) commits (+21/-9):
Btrfs: fix missing release of the space/qgroup reservation in 
start_transaction() (+19/-8)
Btrfs: fix wrong sync_writers decrement in btrfs_file_aio_write() (+2/-1)

Jan Schmidt (1) commits (+10/-12):
Btrfs: fix EDQUOT handling in btrfs_delalloc_reserve_metadata

Liu Bo (1) commits (+38/-9):
Btrfs: fix race between snapshot deletion and getting inode

Chris Mason (1) commits (+4/-1):
Btrfs: move d_instantiate outside the transaction during mksubvol

Eric Sandeen (1) commits (+2/-1):
btrfs: don't try to notify udev about missing devices

Total: (9) commits

 fs/btrfs/extent-tree.c  | 22 ++
 fs/btrfs/extent_map.c   |  3 ++-
 fs/btrfs/file.c | 25 -
 fs/btrfs/ioctl.c|  5 -
 fs/btrfs/ordered-data.c | 13 ++---
 fs/btrfs/scrub.c| 25 -
 fs/btrfs/transaction.c  | 27 +++
 fs/btrfs/volumes.c  |  3 ++-
 8 files changed, 87 insertions(+), 36 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2013-02-06 Thread Chris Mason
[ sorry, my lbdb seems to really like linux-ker...@vger.kerrnel.org,
fixed for real this time ]

Hi Linus,

Please pull my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

We've got corner cases for updating i_size that ceph was hitting, error
handling for quotas when we run out of space, a very subtle snapshot
deletion race, a crash while removing devices, and one deadlock between
subvolume creation and the sb_internal code (thanks lockdep).

Josef Bacik (3) commits (+12/-4):
Btrfs: do not merge logged extents if we've removed them from the tree 
(+2/-1)
Btrfs: fix possible stale data exposure (+1/-1)
Btrfs: fix missing i_size update (+9/-2)

Miao Xie (2) commits (+21/-9):
Btrfs: fix missing release of the space/qgroup reservation in 
start_transaction() (+19/-8)
Btrfs: fix wrong sync_writers decrement in btrfs_file_aio_write() (+2/-1)

Jan Schmidt (1) commits (+10/-12):
Btrfs: fix EDQUOT handling in btrfs_delalloc_reserve_metadata

Liu Bo (1) commits (+38/-9):
Btrfs: fix race between snapshot deletion and getting inode

Chris Mason (1) commits (+4/-1):
Btrfs: move d_instantiate outside the transaction during mksubvol

Eric Sandeen (1) commits (+2/-1):
btrfs: don't try to notify udev about missing devices

Total: (9) commits

 fs/btrfs/extent-tree.c  | 22 ++
 fs/btrfs/extent_map.c   |  3 ++-
 fs/btrfs/file.c | 25 -
 fs/btrfs/ioctl.c|  5 -
 fs/btrfs/ordered-data.c | 13 ++---
 fs/btrfs/scrub.c| 25 -
 fs/btrfs/transaction.c  | 27 +++
 fs/btrfs/volumes.c  |  3 ++-
 8 files changed, 87 insertions(+), 36 deletions(-)
--
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
--
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: [GIT PULL] Btrfs fixes

2013-01-24 Thread Chris Mason
On Tue, Jan 22, 2013 at 05:48:33PM -0700, Chris Mason wrote:
 Hi Linus,
 
 My for-linus branch has our batch of btrfs fixes:
 
 git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus
 
 We've been hammering away at a crc corruption as well, which I was
 really hoping to get into this pull.  It isn't nailed down yet, but we
 were finally able to get a solid way to reproduce.  The only good
 news is it isn't a recent regression.

Update on this, we've tracked down the crc errors and are doing final
checks on the patches.  Linus are you planning on taking this pull?  If
not I can just fold the new stuff into a bigger request.

-chris
--
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: [GIT PULL] Btrfs fixes

2013-01-24 Thread Linus Torvalds
On Thu, Jan 24, 2013 at 1:52 PM, Chris Mason chris.ma...@fusionio.com wrote:

 Update on this, we've tracked down the crc errors and are doing final
 checks on the patches.  Linus are you planning on taking this pull?  If
 not I can just fold the new stuff into a bigger request.

If you have them basically ready, add them to this, I haven't pulled
yet. So I'll just ignore this and wait for another pull request.

 Linus
--
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


[GIT PULL] Btrfs fixes (v2)

2013-01-24 Thread Chris Mason
Hi Linus,

My for-linus branch has our batch of btrfs fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

It turns out that we had two crc bugs when running fsx-linux in a
loop.  Many thanks to Josef, Miao Xie, and Dave Sterba for nailing it
all down.  Miao also has a new OOM fix in this v2 pull as well.

Ilya fixed a regression Liu Bo found in the balance ioctls for pausing
and resuming a running balance across drives.

Josef's orphan truncate patch fixes an obscure corruption we'd see
during xfstests.

Arne's patches address problems with subvolume quotas.  If the user
destroys quota groups incorrectly the FS will refuse to mount.

The rest are smaller fixes and plugs for memory leaks.

Miao Xie (8) commits (+76/-24):
Btrfs: fix missing write access release in btrfs_ioctl_resize() (+1/-0)
Btrfs: do not delete a subvolume which is in a R/O subvolume (+5/-5)
Btrfs: Add ACCESS_ONCE() to transaction-abort accesses (+3/-2)
Btrfs: fix wrong max device number for single profile (+1/-1)
Btrfs: fix repeated delalloc work allocation (+41/-14)
Btrfs: fix missed transaction-aborted check (+16/-0)
Btrfs: fix resize a readonly device (+4/-2)
Btrfs: disable qgroup id 0 (+5/-0)

Ilya Dryomov (6) commits (+94/-32):
Btrfs: reorder locks and sanity checks in btrfs_ioctl_defrag (+9/-8)
Btrfs: fix mutually exclusive op is running error code (+4/-4)
Btrfs: fix a regression in balance usage filter (+8/-1)
Btrfs: bring back balance pause/resume logic (+71/-17)
Btrfs: fix unlock order in btrfs_ioctl_rm_dev (+1/-1)
Btrfs: fix unlock order in btrfs_ioctl_resize (+1/-1)

Liu Bo (5) commits (+23/-7):
Btrfs: fix a bug when llseek for delalloc bytes behind prealloc extents 
(+14/-6)
Btrfs: use right range to find checksum for compressed extents (+5/-0)
Btrfs: let allocation start from the right raid type (+1/-1)
Btrfs: reset path lock state to zero (+2/-0)
Btrfs: fix off-by-one in lseek (+1/-0)

Josef Bacik (5) commits (+69/-29):
Btrfs: do not allow logged extents to be merged or removed (+16/-3)
Btrfs: add orphan before truncating pagecache (+38/-15)
Btrfs: set flushing if we're limited flushing (+1/-1)
Btrfs: put csums on the right ordered extent (+2/-2)
Btrfs: fix panic when recovering tree log (+12/-8)

Arne Jansen (2) commits (+19/-1):
Btrfs: prevent qgroup destroy when there are still relations (+12/-1)
Btrfs: ignore orphan qgroup relations (+7/-0)

Zach Brown (1) commits (+1/-0):
btrfs: fix btrfs_cont_expand() freeing IS_ERR em

Lukas Czerner (1) commits (+1/-1):
btrfs: get the device in write mode when deleting it

Eric Sandeen (1) commits (+14/-3):
btrfs: update timestamps on truncate()

Tsutomu Itoh (1) commits (+3/-1):
Btrfs: fix memory leak in name_cache_insert()

Total: (30) commits (+300/-98)

 fs/btrfs/extent-tree.c  |   6 +-
 fs/btrfs/extent_map.c   |  13 -
 fs/btrfs/extent_map.h   |   1 +
 fs/btrfs/file-item.c|   4 +-
 fs/btrfs/file.c |  10 +++-
 fs/btrfs/free-space-cache.c |  20 ---
 fs/btrfs/inode.c| 137 +---
 fs/btrfs/ioctl.c| 129 ++---
 fs/btrfs/qgroup.c   |  20 ++-
 fs/btrfs/send.c |   4 +-
 fs/btrfs/super.c|   2 +-
 fs/btrfs/transaction.c  |  19 +-
 fs/btrfs/tree-log.c |  10 +++-
 fs/btrfs/volumes.c  |  23 ++--
 14 files changed, 300 insertions(+), 98 deletions(-)
--
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: [GIT PULL] Btrfs fixes

2013-01-22 Thread Liu Bo
On Tue, Jan 22, 2013 at 07:48:33PM -0500, Chris Mason wrote:
 Hi Linus,
 
 My for-linus branch has our batch of btrfs fixes:
 
 git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus
 
 We've been hammering away at a crc corruption as well, which I was
 really hoping to get into this pull.  It isn't nailed down yet, but we
 were finally able to get a solid way to reproduce.  The only good
 news is it isn't a recent regression.
 
 The most important batch of fixes in here come from Ilya.  They address
 a regression Liu Bo found in the balance ioctls for pausing and resuming
 a running balance across drives.
 
 Josef's orphan truncate patch fixes an obscure corruption we'd see
 during xfstests.
 
 Arne's patches address problems with subvolume quotas.  If the user
 destroys quota groups incorrectly the FS will refuse to mount.
 
 The rest are smaller fixes and plugs for memory leaks.

Hi,

Any chance to get these in this round?  I think they're good fixes,
a memory leak and a warning fix, both are got from xfstests.

- Btrfs: use right range to find checksum for compressed extents
  https://patchwork.kernel.org/patch/1937031/
- Btrfs: fix memory leak on extent map after fsync
  https://patchwork.kernel.org/patch/1946561/

thanks,
liubo

 
 Ilya Dryomov (6) commits (+94/-32):
 Btrfs: reorder locks and sanity checks in btrfs_ioctl_defrag (+9/-8)
 Btrfs: fix mutually exclusive op is running error code (+4/-4)
 Btrfs: fix a regression in balance usage filter (+8/-1)
 Btrfs: bring back balance pause/resume logic (+71/-17)
 Btrfs: fix unlock order in btrfs_ioctl_rm_dev (+1/-1)
 Btrfs: fix unlock order in btrfs_ioctl_resize (+1/-1)
 
 Liu Bo (4) commits (+18/-7):
 Btrfs: fix a bug when llseek for delalloc bytes behind prealloc extents 
 (+14/-6)
 Btrfs: let allocation start from the right raid type (+1/-1)
 Btrfs: reset path lock state to zero (+2/-0)
 Btrfs: fix off-by-one in lseek (+1/-0)
 
 Miao Xie (4) commits (+15/-7):
 Btrfs: fix missing write access release in btrfs_ioctl_resize() (+1/-0)
 Btrfs: do not delete a subvolume which is in a R/O subvolume (+5/-5)
 Btrfs: fix resize a readonly device (+4/-2)
 Btrfs: disable qgroup id 0 (+5/-0)
 
 Arne Jansen (2) commits (+19/-1):
 Btrfs: prevent qgroup destroy when there are still relations (+12/-1)
 Btrfs: ignore orphan qgroup relations (+7/-0)
 
 Josef Bacik (2) commits (+39/-16):
 Btrfs: add orphan before truncating pagecache (+38/-15)
 Btrfs: set flushing if we're limited flushing (+1/-1)
 
 Zach Brown (1) commits (+1/-0):
 btrfs: fix btrfs_cont_expand() freeing IS_ERR em
 
 Lukas Czerner (1) commits (+1/-1):
 btrfs: get the device in write mode when deleting it
 
 Eric Sandeen (1) commits (+14/-3):
 btrfs: update timestamps on truncate()
 
 Tsutomu Itoh (1) commits (+3/-1):
 Btrfs: fix memory leak in name_cache_insert()
 
 Total: (22) commits
 
  fs/btrfs/extent-tree.c |   6 ++-
  fs/btrfs/file.c|  10 ++--
  fs/btrfs/inode.c   |  82 +++
  fs/btrfs/ioctl.c   | 129 
 +++--
  fs/btrfs/qgroup.c  |  20 +++-
  fs/btrfs/send.c|   4 +-
  fs/btrfs/volumes.c |  21 ++--
  7 files changed, 204 insertions(+), 68 deletions(-)
 --
 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
--
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


[GIT PULL] Btrfs fixes

2012-10-26 Thread Chris Mason
Hi Linus,

My for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Has our series of fixes for the next rc.  The biggest batch is from Jan
Schmidt, fixing up some problems in our subvolume quota code and fixing
btrfs send/receive to work with the new extended inode refs.

My git tree is against 3.6, but these were all retested against your
current git.

Jan Schmidt (7) commits (+149/-76):
Btrfs: don't put removals from push_node_left into tree mod log twice 
(+7/-2)
Btrfs: fix a tree mod logging issue for root replacement operations (+2/-8)
Btrfs: tree mod log's old roots could still be part of the tree (+21/-4)
Btrfs: fix extent buffer reference for tree mod log roots (+1/-1)
Btrfs: extended inode refs support for send mechanism (+94/-58)
Btrfs: comment for loop in tree_mod_log_insert_move (+5/-0)
Btrfs: determine level of old roots (+19/-3)

Josef Bacik (2) commits (+8/-6):
Btrfs: Use btrfs_update_inode_fallback when creating a snapshot (+6/-5)
Btrfs: do not bug when we fail to commit the transaction (+2/-1)

Stefan Behrens (1) commits (+2/-2):
Btrfs: Fix wrong error handling code

Lukas Czerner (1) commits (+2/-1):
btrfs: Return EINVAL when length to trim is less than FSB

Arne Jansen (1) commits (+2/-1):
Btrfs: send correct rdev and mode in btrfs-send

Gabriel de Perthuis (1) commits (+1/-1):
Fix a sign bug causing invalid memory access in the ino_paths ioctl.

Liu Bo (1) commits (+5/-3):
Btrfs: fix memory leak when cloning root's node

Alex Lyakas (1) commits (+13/-14):
Btrfs: Send: preserve ownership (uid and gid) also for symlinks.

Miao Xie (1) commits (+7/-0):
Btrfs: fix deadlock caused by the nested chunk allocation

Tsutomu Itoh (1) commits (+13/-4):
Btrfs: fix memory leak in btrfs_quota_enable()

Total: (17) commits (+202/-108)
 fs/btrfs/backref.c |  28 -
 fs/btrfs/backref.h |   4 ++
 fs/btrfs/ctree.c   |  70 +-
 fs/btrfs/ctree.h   |   3 +
 fs/btrfs/extent_io.c   |   4 +-
 fs/btrfs/inode.c   |   7 +--
 fs/btrfs/ioctl.c   |   6 +-
 fs/btrfs/qgroup.c  |  17 --
 fs/btrfs/send.c| 156 ++---
 fs/btrfs/transaction.c |   2 +-
 fs/btrfs/volumes.c |   7 +++
 11 files changed, 199 insertions(+), 105 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2012-05-06 Thread Chris Mason
Hi everyone,

The for-linus branch in the btrfs git repo has some fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

The big ones here are a memory leak we introduced in rc1, and 
a scheduling while atomic if the transid on disk doesn't match the
transid we expected.  This happens for corrupt blocks, or out of date
disks.

It also fixes up the ioctl definition for our ioctl to resolve logical
inode numbers.  The __u32 was a merging error and doesn't match what we
ship in the progs.

Chris Mason (2) commits (+36/-17):
Btrfs: avoid sleeping in verify_parent_transid while atomic (+34/-17)
Btrfs: Add properly locking around add_root_to_dirty_list (+2/-0)

Stefan Behrens (1) commits (+7/-0):
Btrfs: fix crash in scrub repair code when device is missing

Josef Bacik (1) commits (+2/-2):
Btrfs: fix page leak when allocing extent buffers

Alexander Block (1) commits (+2/-2):
btrfs: Fix mismatching struct members in ioctl.h

Total: (5) commits (+47/-21)

 fs/btrfs/ctree.c   |   28 +++-
 fs/btrfs/disk-io.c |   18 +-
 fs/btrfs/disk-io.h |3 ++-
 fs/btrfs/extent-tree.c |2 +-
 fs/btrfs/extent_io.c   |4 ++--
 fs/btrfs/ioctl.h   |4 ++--
 fs/btrfs/scrub.c   |7 +++
 fs/btrfs/tree-log.c|2 +-
 8 files changed, 47 insertions(+), 21 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2012-04-28 Thread Chris Mason
Hi everyone,

The for-linus branch of the btrfs git tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Has our collection of bug fixes.  I missed the last rc because I thought
our patches were making NFS crash during my xfs test runs.  Turns out it
was an NFS client bug fixed by someone else while I tried to bisect it.

All of these fixes are small, but some are fairly high impact.  The
biggest are fixes for our mount -o remount handling, a deadlock due
to GFP_KERNEL allocations in readdir, and a RAID10 error handling bug.

This was tested against both 3.3 and Linus' master as of this morning.

Stefan Behrens (4) commits (+7/-19):
Btrfs: don't count CRC or header errors twice while scrubbing (+0/-15)
Btrfs: fix btrfs_ioctl_dev_info() crash on missing device (+4/-1)
Btrfs: fix that check_int_data mount option was ignored (+1/-1)
Btrfs: fix block_rsv and space_info lock ordering (+2/-2)

Jan Schmidt (3) commits (+20/-8):
Btrfs: don't call free_extent_buffer twice in iterate_irefs (+3/-5)
Btrfs: add missing read locks in backref.c (+15/-2)
Btrfs: fix repair code for RAID10 (+2/-1)

Arne Jansen (3) commits (+39/-26):
btrfs: don't add both copies of DUP to reada extent tree (+13/-0)
btrfs: fix race in reada (+23/-20)
btrfs: don't return EINTR (+3/-6)

Li Zefan (3) commits (+32/-25):
Btrfs: avoid possible use-after-free in clear_extent_bit() (+21/-15)
Btrfs: retrurn void from clear_state_bit (+2/-5)
Btrfs: avoid setting -d_op twice (+9/-5)

Daniel J Blueman (2) commits (+3/-1):
Btrfs: Fix space checking during fs resize (+1/-1)
Btrfs: Prevent root_list corruption (+2/-0)

Chris Mason (2) commits (+8/-31):
Btrfs: avoid deadlocks from GFP_KERNEL allocations during 
btrfs_real_readdir (+1/-29)
Btrfs: reduce lock contention during extent insertion (+7/-2)

Josef Bacik (2) commits (+17/-21):
Btrfs: always store the mirror we read the eb from (+17/-20)
Btrfs: do not start delalloc inodes during sync (+0/-1)

Jesper Juhl (1) commits (+2/-0):
Btrfs: Make free_ipath() deal gracefully with NULL pointers

Liu Bo (1) commits (+3/-3):
Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE

Julia Lawall (1) commits (+3/-1):
fs/btrfs/volumes.c: add missing free_fs_devices

Ilya Dryomov (1) commits (+4/-2):
Btrfs: fix max chunk size check in chunk allocator

Dan Carpenter (1) commits (+2/-0):
Btrfs: double unlock bug in error handling

David Sterba (1) commits (+5/-1):
btrfs: add missing unlocks to transaction abort paths

Sergei Trofimovich (1) commits (+4/-2):
btrfs: fix early abort in 'remount'

Total: (26) commits

 fs/btrfs/backref.c |   27 +--
 fs/btrfs/ctree.h   |2 +-
 fs/btrfs/disk-io.c |   22 +--
 fs/btrfs/extent-tree.c |   15 ++---
 fs/btrfs/extent_io.c   |   56 
 fs/btrfs/extent_io.h   |4 ++--
 fs/btrfs/file.c|9 ++--
 fs/btrfs/inode.c   |   54 --
 fs/btrfs/ioctl.c   |5 -
 fs/btrfs/reada.c   |   48 +
 fs/btrfs/relocation.c  |4 +++-
 fs/btrfs/scrub.c   |   15 -
 fs/btrfs/super.c   |7 +++---
 fs/btrfs/transaction.c |6 +-
 fs/btrfs/volumes.c |   13 +++
 15 files changed, 148 insertions(+), 139 deletions(-)
--
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: [GIT PULL] Btrfs fixes and features

2012-04-02 Thread Liu Bo
On 03/31/2012 01:51 AM, Chris Mason wrote:
 Hi everyone,
 
 This pull request is pretty big, picking up patches that have been under
 development for some time.  I have it in two branches:
 
 # against 3.3
 #
 git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus
 
 # merged with linus git as of this morning (conflict in fs/btrfs/scrub.c)
 #
 git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
 for-linus-merged
 
 The conflict resolution was to pick my version of scrub.c and then go in
 and drop all the KM_ args from kmap/unmap_atomic.
 
 We've merged in the error handling patches from SuSE.  These are already
 shipping in the sles kernel, and they give btrfs the ability to abort
 transactions and go readonly on errors.  It involves a lot of churn as
 they clarify BUG_ONs, and remove the ones we now properly deal with.
 
 Josef reworked the way our metadata interacts with the page cache.
 page-private now points to the btrfs extent_buffer object, which makes
 everything faster.  He changed it so we write an whole extent buffer at
 a time instead of allowing individual pages to go down,, which will be
 important for the raid5/6 code (for the 3.5 merge window ;)
 
 Josef also made us more aggressive about dropping pages for metadata
 blocks that were freed due to COW.  Overall, our metadata caching is
 much faster now.
 
 We've integrated my patch for metadata bigger than the page size.  This
 allows metadata blocks up to 64KB in size.  In practice 16K and 32K seem
 to work best.  For workloads with lots of metadata, this cuts down the
 size of the extent allocation tree dramatically and fragments much less.
 

We still suffer pains in using a sectorsize larger than PAGE_SIZE, so
we'd better add a checker for it, something like:

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 20196f4..08e49d2 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2104,6 +2104,14 @@ int open_ctree(struct super_block *sb,
err = -EINVAL;
goto fail_alloc;
}
+   if (btrfs_super_sectorsize(disk_super)  PAGE_CACHE_SIZE) {
+   printk(KERN_ERR BTRFS: couldn't mount because sectorsize(%d)
+   was larger than PAGE_SIZE(%lu)\n,
+  btrfs_super_sectorsize(disk_super),
+  (unsigned long long)PAGE_CACHE_SIZE);
+   err = -EINVAL;
+   goto fail_alloc;
+   }

features = btrfs_super_incompat_flags(disk_super);
features |= BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF;
-- 
1.6.5.2


thanks,
liubo

 Scrub was updated to support the larger block sizes, which ended up
 being a fairly large change (thanks Stefan Behrens).
 
 We also have an assortment of fixes and updates, especially to the
 balancing code (Ilya Dryomov), the back ref walker (Jan Schmidt) and the
 defragging code (Liu Bo).
 
 Jeff Mahoney (21) commits (+1982/-1051):
 btrfs: clean_tree_block should panic on observed memory corruption and 
 return void (+12/-7)
 btrfs: avoid NULL deref in btrfs_reserve_extent with DEBUG_ENOSPC (+2/-1)
 btrfs: Catch locking failures in {set,clear,convert}_extent_bit (+38/-20)
 btrfs: return void in functions without error conditions (+293/-410)
 btrfs: replace many BUG_ONs with proper error handling (+980/-385)
 btrfs: Remove set bits return from clear_extent_bit (+5/-7)
 btrfs: enhance transaction abort infrastructure (+300/-56)
 btrfs: Factor out tree-ops-merge_bio_hook call (+17/-5)
 btrfs: Fix kfree of member instead of structure (+3/-3)
 btrfs: btrfs_drop_snapshot should return int (+12/-8)
 btrfs: -submit_bio_hook error push-up (+31/-15)
 btrfs: find_and_setup_root error push-up (+6/-5)
 btrfs: __add_reloc_root error push-up (+16/-6)
 btrfs: btrfs_update_root error push-up (+7/-4)
 btrfs: Panic on bad rbtree operations (+39/-9)
 btrfs: Simplify btrfs_submit_bio_hook (+4/-3)
 btrfs: drop gfp_t from lock_extent (+63/-76)
 btrfs: add varargs to btrfs_error (+66/-9)
 btrfs: Simplify btrfs_insert_root (+3/-6)
 btrfs: split extent_state ops (+25/-15)
 btrfs: Add btrfs_panic() (+60/-1)
 
 Ilya Dryomov (11) commits (+177/-159):
 Btrfs: validate target profiles only if we are going to use them (+11/-16)
 Btrfs: stop silently switching single chunks to raid0 on balance (+2/-3)
 Btrfs: add wrappers for working with alloc profiles (+30/-30)
 Btrfs: move alloc_profile_is_valid() to volumes.c (+25/-30)
 Btrfs: make profile_is_valid() check more strict (+17/-12)
 Btrfs: fix infinite loop in btrfs_shrink_device() (+2/-3)
 Btrfs: improve the logic in btrfs_can_relocate() (+18/-6)
 Btrfs: allow dup for data chunks in mixed mode (+9/-4)
 Btrfs: add __get_block_group_index() helper (+12/-5)
 Btrfs: add get_restripe_target() helper (+50/-44)
 Btrfs: fix memory leak in resolver code (+1/-6)
 
 Mark Fasheh (10) commits (+60/-19):
 

[GIT PULL] Btrfs fixes and features

2012-03-30 Thread Chris Mason
Hi everyone,

This pull request is pretty big, picking up patches that have been under
development for some time.  I have it in two branches:

# against 3.3
#
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

# merged with linus git as of this morning (conflict in fs/btrfs/scrub.c)
#
git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
for-linus-merged

The conflict resolution was to pick my version of scrub.c and then go in
and drop all the KM_ args from kmap/unmap_atomic.

We've merged in the error handling patches from SuSE.  These are already
shipping in the sles kernel, and they give btrfs the ability to abort
transactions and go readonly on errors.  It involves a lot of churn as
they clarify BUG_ONs, and remove the ones we now properly deal with.

Josef reworked the way our metadata interacts with the page cache.
page-private now points to the btrfs extent_buffer object, which makes
everything faster.  He changed it so we write an whole extent buffer at
a time instead of allowing individual pages to go down,, which will be
important for the raid5/6 code (for the 3.5 merge window ;)

Josef also made us more aggressive about dropping pages for metadata
blocks that were freed due to COW.  Overall, our metadata caching is
much faster now.

We've integrated my patch for metadata bigger than the page size.  This
allows metadata blocks up to 64KB in size.  In practice 16K and 32K seem
to work best.  For workloads with lots of metadata, this cuts down the
size of the extent allocation tree dramatically and fragments much less.

Scrub was updated to support the larger block sizes, which ended up
being a fairly large change (thanks Stefan Behrens).

We also have an assortment of fixes and updates, especially to the
balancing code (Ilya Dryomov), the back ref walker (Jan Schmidt) and the
defragging code (Liu Bo).

Jeff Mahoney (21) commits (+1982/-1051):
btrfs: clean_tree_block should panic on observed memory corruption and 
return void (+12/-7)
btrfs: avoid NULL deref in btrfs_reserve_extent with DEBUG_ENOSPC (+2/-1)
btrfs: Catch locking failures in {set,clear,convert}_extent_bit (+38/-20)
btrfs: return void in functions without error conditions (+293/-410)
btrfs: replace many BUG_ONs with proper error handling (+980/-385)
btrfs: Remove set bits return from clear_extent_bit (+5/-7)
btrfs: enhance transaction abort infrastructure (+300/-56)
btrfs: Factor out tree-ops-merge_bio_hook call (+17/-5)
btrfs: Fix kfree of member instead of structure (+3/-3)
btrfs: btrfs_drop_snapshot should return int (+12/-8)
btrfs: -submit_bio_hook error push-up (+31/-15)
btrfs: find_and_setup_root error push-up (+6/-5)
btrfs: __add_reloc_root error push-up (+16/-6)
btrfs: btrfs_update_root error push-up (+7/-4)
btrfs: Panic on bad rbtree operations (+39/-9)
btrfs: Simplify btrfs_submit_bio_hook (+4/-3)
btrfs: drop gfp_t from lock_extent (+63/-76)
btrfs: add varargs to btrfs_error (+66/-9)
btrfs: Simplify btrfs_insert_root (+3/-6)
btrfs: split extent_state ops (+25/-15)
btrfs: Add btrfs_panic() (+60/-1)

Ilya Dryomov (11) commits (+177/-159):
Btrfs: validate target profiles only if we are going to use them (+11/-16)
Btrfs: stop silently switching single chunks to raid0 on balance (+2/-3)
Btrfs: add wrappers for working with alloc profiles (+30/-30)
Btrfs: move alloc_profile_is_valid() to volumes.c (+25/-30)
Btrfs: make profile_is_valid() check more strict (+17/-12)
Btrfs: fix infinite loop in btrfs_shrink_device() (+2/-3)
Btrfs: improve the logic in btrfs_can_relocate() (+18/-6)
Btrfs: allow dup for data chunks in mixed mode (+9/-4)
Btrfs: add __get_block_group_index() helper (+12/-5)
Btrfs: add get_restripe_target() helper (+50/-44)
Btrfs: fix memory leak in resolver code (+1/-6)

Mark Fasheh (10) commits (+60/-19):
btrfs: Don't BUG_ON kzalloc error in btrfs_lookup_csums_range() (+13/-2)
btrfs: Don't BUG_ON insert errors in btrfs_alloc_dev_extent() (+3/-1)
btrfs: Go readonly on bad extent refs in update_ref_for_cow() (+5/-1)
btrfs: Don't BUG_ON errors from btrfs_create_subvol_root() (+6/-2)
btrfs: Don't BUG_ON errors from update_ref_for_cow() (+4/-1)
btrfs: Don't BUG_ON errors in __finish_chunk_alloc() (+6/-4)
btrfs: Don't BUG_ON() errors in update_ref_for_cow() (+7/-4)
btrfs: Go readonly on tree errors in balance_level (+11/-2)
btrfs: Remove BUG_ON from __finish_chunk_alloc() (+3/-1)
btrfs: Remove BUG_ON from __btrfs_alloc_chunk() (+2/-1)

Liu Bo (8) commits (+133/-52):
Btrfs: do not bother to defrag an extent if it is a big real extent (+3/-6)
Btrfs: add a check to decide if we should defrag the range (+35/-1)
Btrfs: show useful info in space reservation tracepoint (+13/-25)
Btrfs: fix recursive defragment with autodefrag option (+5/-3)
Btrfs: fix race between direct io and autodefrag (+5/-1)

Re: [GIT PULL] Btrfs fixes and features

2012-03-30 Thread Linus Torvalds
On Fri, Mar 30, 2012 at 10:51 AM, Chris Mason chris.ma...@oracle.com wrote:

 git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This causes a new warning for me:

  fs/btrfs/extent_io.c: In function ‘repair_eb_io_failure’:
  fs/btrfs/extent_io.c:1940:6: warning: ‘ret’ may be used
uninitialized in this function

Hmm?

Linus
--
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: [GIT PULL] Btrfs fixes and features

2012-03-30 Thread Linus Torvalds
On Fri, Mar 30, 2012 at 12:50 PM, Linus Torvalds
torva...@linux-foundation.org wrote:

 This causes a new warning for me:

  fs/btrfs/extent_io.c: In function ‘repair_eb_io_failure’:
  fs/btrfs/extent_io.c:1940:6: warning: ‘ret’ may be used
 uninitialized in this function

 Hmm?

Ok, so presumably num_pages (which is num_extent_pages(eb-start,
eb-len)) cannot be zero, so I guess the code is ok. But gcc can't
know that, and it's an annoying warning.

So please fix, but it's not urgent. In the meantime I've pulled and pushed out.

Linus
--
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: [GIT PULL] Btrfs fixes and features

2012-03-30 Thread Chris Mason
On Fri, Mar 30, 2012 at 12:50:26PM -0700, Linus Torvalds wrote:
 On Fri, Mar 30, 2012 at 10:51 AM, Chris Mason chris.ma...@oracle.com wrote:
 
  git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
  for-linus
 
 This causes a new warning for me:
 
   fs/btrfs/extent_io.c: In function ‘repair_eb_io_failure’:
   fs/btrfs/extent_io.c:1940:6: warning: ‘ret’ may be used
 uninitialized in this function

Interesting that my gcc doesn't warn here.  Strictly speaking, gcc isn't
wrong, but num_extent_pages() will always be at least 1.  This function
is new in this pull, so it can't be a conflict.

Do you want a new pull with the ret = 0 patch?

int repair_eb_io_failure(struct btrfs_root *root, struct extent_buffer
*eb,
 int mirror_num)
{
struct btrfs_mapping_tree *map_tree = root-fs_info-mapping_tree;
u64 start = eb-start;
unsigned long i, num_pages = num_extent_pages(eb-start, eb-len);
int ret;

for (i = 0; i  num_pages; i++) {
struct page *p = extent_buffer_page(eb, i);
ret = repair_io_failure(map_tree, start, PAGE_CACHE_SIZE,
start, p, mirror_num);
if (ret)
break;
start += PAGE_CACHE_SIZE;
}

return ret;
}

-chris
--
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: [GIT PULL] Btrfs fixes and features

2012-03-30 Thread Chris Mason
On Fri, Mar 30, 2012 at 12:54:03PM -0700, Linus Torvalds wrote:
 On Fri, Mar 30, 2012 at 12:50 PM, Linus Torvalds
 torva...@linux-foundation.org wrote:
 
  This causes a new warning for me:
 
   fs/btrfs/extent_io.c: In function ‘repair_eb_io_failure’:
   fs/btrfs/extent_io.c:1940:6: warning: ‘ret’ may be used
  uninitialized in this function
 
  Hmm?
 
 Ok, so presumably num_pages (which is num_extent_pages(eb-start,
 eb-len)) cannot be zero, so I guess the code is ok. But gcc can't
 know that, and it's an annoying warning.

Whoops, my reply was too slow, sorry.  If you're curious my gcc that
doesn't warn in 4.6.3.

 
 So please fix, but it's not urgent. In the meantime I've pulled and pushed 
 out.

Ok, I'll send just the incremental in a later pull.

-chris
--
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: [GIT PULL] Btrfs fixes and features

2012-03-30 Thread Alex
Chris Mason chris.mason at oracle.com writes:

 
 Hi everyone,
 
 This pull request is pretty big, picking up patches that have been under
 development for some time.  I have it in two branches:
 

Thank you all guys for your time, effort and responses here.
No problems here so far ;-)




--
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


[GIT PULL] Btrfs fixes for 3.4

2012-03-27 Thread Jan Schmidt
Hi Chris,

please pull my three current patches from my repo, based on your
for-linus branch (I can rebase them to the integration branch if that
helps):

git://git.jan-o-sch.net/btrfs-unstable for-chris

It's two really small fixes both mentioned earlier and a more or less
imporant fixup for scrub. While working fine in 3.2, name resolving can
deadlock since the first rc of 3.3. I suggest we queue that patch 3/3
for submission to 3.3-stable.

I'm passing xfstests just as good as for-linus is doing without my
patches (which is not really good). I also made some manual error
insertion tests to verify that the scrub deadlock chance is really gone.

And, we really should have an xfstest for raid-repair and scrub-repair.
Anyone? :-)

-Jan

Jan Schmidt (3):
  Btrfs: actually call btrfs_init_lockdep
  Btrfs: check return value of btrfs_cow_block()
  Btrfs: fix regression in scrub path resolving

 fs/btrfs/backref.c |  115 +++
 fs/btrfs/backref.h |5 +-
 fs/btrfs/ioctl.c   |4 +-
 fs/btrfs/scrub.c   |4 +-
 fs/btrfs/super.c   |2 +
 fs/btrfs/transaction.c |6 ++-
 6 files changed, 79 insertions(+), 57 deletions(-)

-- 
1.7.3.4

--
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


[GIT PULL] Btrfs fixes

2012-01-27 Thread Chris Mason
Hi Linus,

We've got a variety pack of fixes in the for-linus branch of the btrfs
repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

These are all smaller fixes caught from different testers, benchmarks
and the occasional compiler warning.

Josef Bacik (3) commits (+3/-2):
Btrfs: use cluster-window_start when allocating from a cluster bitmap 
(+1/-1)
Btrfs: advance window_start if we're using a bitmap (+1/-0)
Btrfs: make sure a bitmap has enough bytes (+1/-1)

Stefan Behrens (1) commits (+6/-5):
Btrfs: fix warning for 32-bit build of fs/btrfs/check-integrity.c

Jan Schmidt (1) commits (+2/-2):
Btrfs: fix uninit warning in backref.c

Liu Bo (1) commits (+1/-1):
Btrfs: do not defrag a file partially

Mitch Harder (1) commits (+2/-0):
Btrfs: Check for NULL page in extent_range_uptodate

Chris Mason (1) commits (+8/-2):
Btrfs: fix reservations in btrfs_page_mkwrite

David Sterba (1) commits (+7/-0):
btrfs: mask out gfp flags in releasepage

Jan Kara (1) commits (+4/-2):
btrfs: Fix busyloops in transaction waiting code

Miao Xie (1) commits (+27/-22):
Btrfs: fix enospc error caused by wrong checks of the chunk

Total: (11) commits (+60/-36)

 fs/btrfs/backref.c  |4 +-
 fs/btrfs/check-integrity.c  |   11 +
 fs/btrfs/disk-io.c  |7 ++
 fs/btrfs/extent-tree.c  |   49 +++---
 fs/btrfs/extent_io.c|2 +
 fs/btrfs/free-space-cache.c |5 ++-
 fs/btrfs/inode.c|   10 +++-
 fs/btrfs/ioctl.c|2 +-
 fs/btrfs/tree-log.c |6 +++-
 9 files changed, 60 insertions(+), 36 deletions(-)

--
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


[GIT PULL] Btrfs fixes

2012-01-27 Thread Chris Mason
[ sorry resend without bad auto-complete for lkml ]

Hi Linus,

We've got a variety pack of fixes in the for-linus branch of the btrfs
repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

These are all smaller fixes caught from different testers, benchmarks
and the occasional compiler warning.

Josef Bacik (3) commits (+3/-2):
Btrfs: use cluster-window_start when allocating from a cluster bitmap 
(+1/-1)
Btrfs: advance window_start if we're using a bitmap (+1/-0)
Btrfs: make sure a bitmap has enough bytes (+1/-1)

Stefan Behrens (1) commits (+6/-5):
Btrfs: fix warning for 32-bit build of fs/btrfs/check-integrity.c

Jan Schmidt (1) commits (+2/-2):
Btrfs: fix uninit warning in backref.c

Liu Bo (1) commits (+1/-1):
Btrfs: do not defrag a file partially

Mitch Harder (1) commits (+2/-0):
Btrfs: Check for NULL page in extent_range_uptodate

Chris Mason (1) commits (+8/-2):
Btrfs: fix reservations in btrfs_page_mkwrite

David Sterba (1) commits (+7/-0):
btrfs: mask out gfp flags in releasepage

Jan Kara (1) commits (+4/-2):
btrfs: Fix busyloops in transaction waiting code

Miao Xie (1) commits (+27/-22):
Btrfs: fix enospc error caused by wrong checks of the chunk

Total: (11) commits (+60/-36)

 fs/btrfs/backref.c  |4 +-
 fs/btrfs/check-integrity.c  |   11 +
 fs/btrfs/disk-io.c  |7 ++
 fs/btrfs/extent-tree.c  |   49 +++---
 fs/btrfs/extent_io.c|2 +
 fs/btrfs/free-space-cache.c |5 ++-
 fs/btrfs/inode.c|   10 +++-
 fs/btrfs/ioctl.c|2 +-
 fs/btrfs/tree-log.c |6 +++-
 9 files changed, 60 insertions(+), 36 deletions(-)

--
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
--
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


[GIT PULL] Btrfs fixes

2011-12-23 Thread Chris Mason
Hi Linus,

My for-linus branch has two commits:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

One is Al's patch in response to my last pull request, but with one small
change to call d_instantiate before trying to log the inode in
btrfs_link.

The other is a double unlock that Dan Carpenter found.  These did get
rebased this morning before I pushed them out, but I reran tests after
the rebase.

Chris Mason (1) commits (+2/-1):
Btrfs: fix worker lock misuse in find_worker

Al Viro (1) commits (+5/-4):
Btrfs: call d_instantiate after all ops are setup

Total: (2) commits (+7/-5)

 fs/btrfs/async-thread.c |3 ++-
 fs/btrfs/inode.c|9 +
 2 files changed, 7 insertions(+), 5 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2011-12-16 Thread Chris Mason
Hi everyone,

This pull request is bigger than I wanted it to be, but Josef has
commits in here for some long running ENOSPC bugs in btrfs.  This is
a few weeks of tracing our delalloc reservations from Josef, and then
fixing up the related bugs.

Outside of Josef's patches we have some assorted fixes.  Arne figured
out we were orphaning whole snapshots if you unmounted enough times
while the snapshot was being deleted.

Josef Bacik (6) commits (+212/-117):
Btrfs: fix how we do delalloc reservations and how we free reservations on 
error (+44/-13)
Btrfs: fix num_workers_starting bug and other bugs in async thread (+83/-78)
Btrfs: only set cache_generation if we setup the block group (+1/-1)
Btrfs: deal with enospc from dirtying inodes properly (+80/-22)
Btrfs: don't panic if orphan item already exists (+1/-1)
Btrfs: fix leaked space in truncate (+3/-2)

Chris Mason (4) commits (+10/-4):
Btrfs: fix btrfs_end_bio to deal with write errors to a single mirror 
(+1/-1)
Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code (+2/-2)
Btrfs: add a cond_resched() into the worker loop (+1/-1)
Btrfs: unplug every once and a while (+6/-0)

Miao Xie (3) commits (+29/-13):
Btrfs: fix wrong i_size when truncating a file to a larger size (+12/-6)
Btrfs: fix inaccurate available space on raid0 profile (+13/-6)
Btrfs: fix wrong disk space information of the files (+4/-1)

Casey Schaufler (1) commits (+26/-5):
BTRFS: Establish i_ops before calling d_instantiate

Arne Jansen (1) commits (+32/-0):
btrfs: keep orphans for subvolume deletion

Li Zefan (1) commits (+2/-2):
Btrfs: fix ctime update of on-disk inode

Total: (16) commits (+309/-140)

 fs/btrfs/async-thread.c  |  117 ++
 fs/btrfs/async-thread.h  |4 +-
 fs/btrfs/ctree.h |3 +-
 fs/btrfs/delayed-inode.c |4 +-
 fs/btrfs/disk-io.c   |   34 ++
 fs/btrfs/extent-tree.c   |   45 
 fs/btrfs/file.c  |6 ++-
 fs/btrfs/inode.c |  180 +-
 fs/btrfs/ioctl.c |6 +-
 fs/btrfs/relocation.c|2 +
 fs/btrfs/scrub.c |8 ++-
 fs/btrfs/super.c |   32 +++--
 fs/btrfs/volumes.c   |8 ++-
 13 files changed, 309 insertions(+), 140 deletions(-)
--
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: [GIT PULL] Btrfs fixes

2011-12-16 Thread Chris Mason
On Fri, Dec 16, 2011 at 12:53:44PM -0500, Chris Mason wrote:
 Hi everyone,
 
 This pull request is bigger than I wanted it to be, but Josef has
 commits in here for some long running ENOSPC bugs in btrfs.  This is
 a few weeks of tracing our delalloc reservations from Josef, and then
 fixing up the related bugs.
 
 Outside of Josef's patches we have some assorted fixes.  Arne figured
 out we were orphaning whole snapshots if you unmounted enough times
 while the snapshot was being deleted.

Sorry, this part is missing:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

 
 Josef Bacik (6) commits (+212/-117):
 Btrfs: fix how we do delalloc reservations and how we free reservations 
 on error (+44/-13)
 Btrfs: fix num_workers_starting bug and other bugs in async thread 
 (+83/-78)
 Btrfs: only set cache_generation if we setup the block group (+1/-1)
 Btrfs: deal with enospc from dirtying inodes properly (+80/-22)
 Btrfs: don't panic if orphan item already exists (+1/-1)
 Btrfs: fix leaked space in truncate (+3/-2)
 
 Chris Mason (4) commits (+10/-4):
 Btrfs: fix btrfs_end_bio to deal with write errors to a single mirror 
 (+1/-1)
 Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code 
 (+2/-2)
 Btrfs: add a cond_resched() into the worker loop (+1/-1)
 Btrfs: unplug every once and a while (+6/-0)
 
 Miao Xie (3) commits (+29/-13):
 Btrfs: fix wrong i_size when truncating a file to a larger size (+12/-6)
 Btrfs: fix inaccurate available space on raid0 profile (+13/-6)
 Btrfs: fix wrong disk space information of the files (+4/-1)
 
 Casey Schaufler (1) commits (+26/-5):
 BTRFS: Establish i_ops before calling d_instantiate
 
 Arne Jansen (1) commits (+32/-0):
 btrfs: keep orphans for subvolume deletion
 
 Li Zefan (1) commits (+2/-2):
 Btrfs: fix ctime update of on-disk inode
 
 Total: (16) commits (+309/-140)
 
  fs/btrfs/async-thread.c  |  117 ++
  fs/btrfs/async-thread.h  |4 +-
  fs/btrfs/ctree.h |3 +-
  fs/btrfs/delayed-inode.c |4 +-
  fs/btrfs/disk-io.c   |   34 ++
  fs/btrfs/extent-tree.c   |   45 
  fs/btrfs/file.c  |6 ++-
  fs/btrfs/inode.c |  180 
 +-
  fs/btrfs/ioctl.c |6 +-
  fs/btrfs/relocation.c|2 +
  fs/btrfs/scrub.c |8 ++-
  fs/btrfs/super.c |   32 +++--
  fs/btrfs/volumes.c   |8 ++-
  13 files changed, 309 insertions(+), 140 deletions(-)
 --
 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
--
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


[GIT PULL] Btrfs fixes (part two, against 3.2-rc)

2011-12-16 Thread Chris Mason
Hi everyone,

I try to keep most of the btrfs commits against the last release.  This
way, people can update their old and crusty kernels from 3 months ago,
and still have the latest btrfs code.

We do have one commit that is 3.2 specific though, so I put it into a
for-linus-3.2 branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git 
for-linus-3.2

Wu Fengguang noticed that btrfs' file write needs to consider the balance
dirty thresholds when it allows big multi-page writes.

Wu Fengguang (1) commits (+2/-0):
btrfs: lower the dirty balance poll interval

Total: (1) commits (+2/-0)

 fs/btrfs/file.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

--
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: [GIT PULL] Btrfs fixes

2011-12-16 Thread nobody
Chris Mason chris.mason at oracle.com writes:
 
 Hi everyone,
 
 This pull request is bigger than I wanted it to be, but Josef has
 commits in here for some long running ENOSPC bugs in btrfs. 

 % git log --no-merges --grep=enospc | grep commit | wc -l
45
 % git log --no-merges --grep=enospc|grep Date:
Date:   Fri Oct 7 11:55:34 2011 -0400
Date:   Mon Sep 26 17:12:22 2011 -0400
Date:   Tue Aug 30 10:19:10 2011 -0400
Date:   Mon Aug 29 14:06:00 2011 -0400
Date:   Tue Jul 26 17:00:46 2011 -0400
Date:   Fri Jul 15 15:16:44 2011 +
Date:   Tue Jun 7 16:07:44 2011 -0400
Date:   Tue Jun 7 15:07:51 2011 -0400
Date:   Fri May 27 16:11:38 2011 -0400
Date:   Wed May 25 13:10:16 2011 -0400
Date:   Tue Apr 5 11:57:27 2011 -0400
Date:   Wed Feb 16 13:57:04 2011 -0500
Date:   Wed Feb 16 13:10:41 2011 -0500
Date:   Fri Nov 12 23:17:56 2010 +
Date:   Wed May 26 11:31:00 2010 -0400
Date:   Tue May 25 20:56:50 2010 -0400
Date:   Fri Mar 19 14:38:13 2010 +
Date:   Thu Dec 17 15:47:17 2009 -0500
Date:   Wed Nov 11 10:16:57 2009 -0500
Date:   Tue Nov 10 21:23:48 2009 -0500
Date:   Tue Sep 22 14:48:44 2009 -0400
Date:   Mon Nov 17 21:12:00 2008 -0500
Date:   Fri Nov 7 18:17:11 2008 -0500
Date:   Fri Nov 7 09:06:11 2008 -0500
Date:   Wed Oct 29 14:49:05 2008 -0400
Date:   Thu Jan 3 09:22:38 2008 -0500
Date:   Mon Sep 17 11:00:51 2007 -0400
Date:   Wed Aug 29 09:11:44 2007 -0400


--
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


[GIT PULL] Btrfs fixes

2011-12-08 Thread Chris Mason
Hi everyone,

The for-linus branch of the btrfs repository:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Has a few more fixes.  The most notable here are two more patches from
Alexandre's batch of allocator fixes.  The other two fix corner cases in
the state code and in the code to add devices.

Alexandre Oliva (2) commits (+49/-51):
Btrfs: try to allocate from cluster even at LOOP_NO_EMPTY_SIZE (+18/-8)
Btrfs: try cluster but don't advance in search list (+31/-43)

Liu Bo (1) commits (+16/-8):
Btrfs: drop spin lock when memory alloc fails

Li Zefan (1) commits (+1/-1):
Btrfs: check if the to-be-added device is writable

Total: (4) commits (+66/-60)

 fs/btrfs/extent-tree.c |  100 +++
 fs/btrfs/extent_io.c   |   24 
 fs/btrfs/volumes.c |2 +-
 3 files changed, 66 insertions(+), 60 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2011-11-21 Thread Chris Mason
Hi everyone,

The for-linus branch of the linux-btrfs repo has some important fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

The most important in the bunch fixes the btrfs cache flushing.  This
one probably explains many of the corruptions that have been reported,
especially on multi-device filesystems.  I had a hard time hitting it
locally, partially because it is much less likely to happen for fsync
based commits and most of my tests used fsyncs to exercise the commit
code.  Ceph users running with -o notreelog were dramatically more
likely to trigger the corruptions.

The problem was that btrfs was triggering cache flushes before the last
copy of the super block, instead of doing them before the first copy.
We also needed to be more careful about getting flushes done to all the
devices in a multi-device FS before writing any of the supers.  To help
verify the new code, I wrote up a writeback-caching elevator, which I
sent posted earlier today for comments/review.

Many thanks to Alexandre Oliva and Arne Jansen for helping nail this
down.

Outside of the cache flushes, we also have a fix from Liu Bo for
corruptions when snapshotting with mount -o inode_cache enabled.

My for-linus branch is still against 3.1, but these were tested on Linus
git as well.

Josef Bacik (3) commits (+90/-42):
Btrfs: wait on caching if we're loading the free space cache (+81/-41)
Btrfs: clear pages dirty for io and set them extent mapped (+5/-0)
Btrfs: sectorsize align offsets in fiemap (+4/-1)

Chris Mason (2) commits (+141/-18):
Btrfs: remove free-space-cache.c WARN during log replay (+7/-1)
Btrfs: fix barrier flushes (+134/-17)

Li Zefan (2) commits (+16/-38):
Btrfs: avoid unnecessary bitmap search for cluster setup (+4/-38)
Btrfs: fix to search one more bitmap for cluster setup (+12/-0)

Jan Schmidt (1) commits (+4/-4):
btrfs: mirror_num should be int, not u64

Jeff Mahoney (1) commits (+9/-6):
btrfs: Fix up 32/64-bit compatibility for new ioctls

Liu Bo (1) commits (+26/-1):
Btrfs: fix tree corruption after multi-thread snapshots and inode_cache 
flush

Arnd Hannemann (1) commits (+3/-3):
Btrfs: prefix resize related printks with btrfs:

David Sterba (1) commits (+4/-2):
btrfs: fix stat blocks accounting

Total: (12) commits (+290/-111)

 fs/btrfs/backref.c  |2 +-
 fs/btrfs/ctree.c|   17 +-
 fs/btrfs/ctree.h|5 +-
 fs/btrfs/disk-io.c  |  147 +-
 fs/btrfs/extent-tree.c  |  119 +++
 fs/btrfs/extent_io.c|9 ++-
 fs/btrfs/extent_io.h|2 +-
 fs/btrfs/free-space-cache.c |   63 ---
 fs/btrfs/inode.c|6 +-
 fs/btrfs/ioctl.c|   15 +++--
 fs/btrfs/scrub.c|2 +-
 fs/btrfs/transaction.c  |8 +++
 fs/btrfs/volumes.h  |6 ++
 13 files changed, 290 insertions(+), 111 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2011-11-11 Thread Chris Mason
Hi Linus,

The for-linus branch of the btrfs git tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus
sha: 8965593e41dd2d0e2a2f1e6f245336005ea94a2c

Has our fixes since rc1.  These are pretty small, for the most part
we're nailing some regressions in the mount error handling code and
tweaking the ENOSPC throttling.

My for-linus tree is against 3.1, but this was tested against 3.2-rc1 as
well.

Miao Xie (6) commits (+47/-23):
Btrfs: Abstract similar code for btrfs_block_rsv_add{, _noflush} (+12/-16)
Btrfs: fix deadlock caused by the race between relocation (+2/-2)
Btrfs: fix no reserved space for writing out inode cache (+24/-4)
Btrfs: fix unreleased path in btrfs_orphan_cleanup() (+3/-0)
Btrfs: fix nocow when deleting the item (+4/-1)
Btrfs: fix orphan backref nodes (+2/-0)

Ilya Dryomov (5) commits (+43/-46):
Btrfs: avoid null dereference and leaks when bailing from open_ctree() 
(+15/-20)
Btrfs: close devices on all error paths in open_ctree() (+3/-4)
Btrfs: fix subvol_name leak on error in btrfs_mount() (+3/-1)
Btrfs: fix memory leak in btrfs_parse_early_options() (+1/-0)
Btrfs: rework error handling in btrfs_mount() (+21/-21)

Chris Mason (2) commits (+56/-33):
Btrfs: fix oops on NULL trans handle in btrfs_truncate (+9/-7)
Btrfs: tweak the delayed inode reservations again (+47/-26)

Josef Bacik (2) commits (+93/-16):
Btrfs: only map pages if we know we need them when reading the space cache 
(+10/-7)
Btrfs: fix our reservations for updating an inode when completing io 
(+83/-9)

sly...@gmail.com (1) commits (+5/-3):
btrfs: fix double-free 'tree_root' in 'btrfs_mount()'

Arne Jansen (1) commits (+29/-35):
Btrfs: handle bio_add_page failure gracefully in scrub

David Sterba (1) commits (+2/-2):
btrfs: rename the option to nospace_cache

Total: (18) commits

 fs/btrfs/btrfs_inode.h  |4 +--
 fs/btrfs/delayed-inode.c|   58 +-
 fs/btrfs/disk-io.c  |   42 +
 fs/btrfs/extent-tree.c  |   50 --
 fs/btrfs/free-space-cache.c |   17 +
 fs/btrfs/inode-map.c|   28 --
 fs/btrfs/inode.c|   84 +--
 fs/btrfs/relocation.c   |2 +
 fs/btrfs/scrub.c|   64 +++--
 fs/btrfs/super.c|   49 ++---
 fs/btrfs/transaction.c  |4 +-
 fs/btrfs/volumes.c  |5 ++-
 12 files changed, 262 insertions(+), 145 deletions(-)
--
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: [GIT PULL] Btrfs fixes

2011-09-20 Thread Sage Weil
Hi Chris-

This pull misses the clone reservation fix again... :)

http://www.spinics.net/lists/linux-btrfs/msg11826.html

Thanks!
sage



On Mon, 19 Sep 2011, Chris Mason wrote:

 Hi everyone,
 
 The for-linus branch of the btrfs tree on github:
 
 Head commit: a66e7cc626f42de6c745963fe0d807518fa49d39
 git://github.com/chrismason/linux.git for-linus
 
 Has the following fixes.  for-linus is against rc6, since some of these
 are regression fixes for earlier 3.1 btrfs commits.  The most important
 of the bunch is Josef's dentry fix, which avoids enoents if we race with
 multiple procs hitting on the same inode.  This bug is btrfs-specific,
 it came in with his optimization to cache the inode location during
 readdir.
 
 Li Zefan (3) commits (+9/-5):
 Btrfs: don't make a file partly checksummed through file clone (+5/-0)
 Btrfs: don't change inode flag of the dest clone file (+0/-1)
 Btrfs: fix pages truncation in btrfs_ioctl_clone() (+4/-4)
 
 Josef Bacik (1) commits (+11/-2):
 Btrfs: only clear the need lookup flag after the dentry is setup
 
 Jeff Liu (1) commits (+7/-2):
 BTRFS: Fix lseek return value for error
 
 Hidetoshi Seto (1) commits (+3/-2):
 btrfs: fix d_off in the first dirent
 
 Total: (6) commits (+30/-11)
 
  fs/btrfs/file.c  |9 +++--
  fs/btrfs/inode.c |   18 ++
  fs/btrfs/ioctl.c |   14 +-
  3 files changed, 30 insertions(+), 11 deletions(-)
 --
 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
 
 
--
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


[GIT PULL] Btrfs fixes

2011-09-19 Thread Chris Mason
Hi everyone,

The for-linus branch of the btrfs tree on github:

Head commit: a66e7cc626f42de6c745963fe0d807518fa49d39
git://github.com/chrismason/linux.git for-linus

Has the following fixes.  for-linus is against rc6, since some of these
are regression fixes for earlier 3.1 btrfs commits.  The most important
of the bunch is Josef's dentry fix, which avoids enoents if we race with
multiple procs hitting on the same inode.  This bug is btrfs-specific,
it came in with his optimization to cache the inode location during
readdir.

Li Zefan (3) commits (+9/-5):
Btrfs: don't make a file partly checksummed through file clone (+5/-0)
Btrfs: don't change inode flag of the dest clone file (+0/-1)
Btrfs: fix pages truncation in btrfs_ioctl_clone() (+4/-4)

Josef Bacik (1) commits (+11/-2):
Btrfs: only clear the need lookup flag after the dentry is setup

Jeff Liu (1) commits (+7/-2):
BTRFS: Fix lseek return value for error

Hidetoshi Seto (1) commits (+3/-2):
btrfs: fix d_off in the first dirent

Total: (6) commits (+30/-11)

 fs/btrfs/file.c  |9 +++--
 fs/btrfs/inode.c |   18 ++
 fs/btrfs/ioctl.c |   14 +-
 3 files changed, 30 insertions(+), 11 deletions(-)
--
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: [GIT PULL] btrfs fixes

2011-07-11 Thread Tarkan Erimer

On 07/08/2011 09:55 PM, Chris Mason wrote:

Hi everyone,

The for-linus branch of the btrfs-unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has three more fixes.  We're fixing oopsen during space balancing (btrfs
filesystem balance /mnt)) and during device removal.

Dave Sterba also sent in a patch to make /proc/mounts properly match a
few new mount options, which he (correctly I think) considers a
regression fix because it makes it hard for testers/users to verify the
options in a running config.



Hi Chris,

Maybe, any development regarding to the [BUG] Btrfs: Corrupted root 
filesystem subjected bug posted by me ?



Tarkan
--
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


[GIT PULL] btrfs fixes

2011-07-08 Thread Chris Mason
Hi everyone,

The for-linus branch of the btrfs-unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has three more fixes.  We're fixing oopsen during space balancing (btrfs
filesystem balance /mnt)) and during device removal.

Dave Sterba also sent in a patch to make /proc/mounts properly match a
few new mount options, which he (correctly I think) considers a
regression fix because it makes it hard for testers/users to verify the
options in a running config.

Josef Bacik (1) commits (+2/-1):
Btrfs: don't panic if we get an error while balancing V2

David Sterba (1) commits (+11/-0):
btrfs: add missing options displayed in mount output

Miao Xie (1) commits (+7/-5):
btrfs: fix oops when doing space balance

Total: (3) commits (+20/-6)

 fs/btrfs/ctree.h   |5 +
 fs/btrfs/inode.c   |   12 +++-
 fs/btrfs/super.c   |6 ++
 fs/btrfs/volumes.c |3 ++-
 4 files changed, 20 insertions(+), 6 deletions(-)
--
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


[GIT PULL] Btrfs fixes for 2.6.38

2011-03-13 Thread Chris Mason
Hi everyone,

We've been working on a few important Btrfs regressions for the last two
weeks, and this pull request has the result.  Many thanks to Mitch
Harder and Xin Zhong for nailing down the btrfs_file_write looping.

Linus, please pull the master branch of the btrfs unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

These commits keep btrfs_file_write from looping forever when things go
wrong with copy_from_user, and they also make sure not to produce
partially up to date pages if copy_from_user gives us a short return.

Hammering on btrfs fiemap found another bug where we returned
overlapping extents, which made for incorrect results with the cp
program (destination files larger than the original).

This pull also has a commit to tweak our forced delalloc writeback while
we are trying to reclaim space.  With a number of writers determined to
fill the FS, we used to end up stuck in shrink_delalloc forever.

Chris Mason (4) commits (+131/-60):
Btrfs: make sure not to return overlapping extents to fiemap (+27/-6)
Btrfs: deal with short returns from copy_from_user (+13/-0)
Btrfs: fix regressions in copy_from_user handling (+59/-42)
Btrfs: break out of shrink_delalloc earlier (+32/-12)

Miao Xie (1) commits (+3/-2):
btrfs: fix not enough reserved space

Daniel J Blueman (1) commits (+1/-0):
btrfs: fix dip leak

Total: (6) commits (+135/-62)

 fs/btrfs/ctree.h   |9 
 fs/btrfs/extent-tree.c |   35 ++-
 fs/btrfs/extent_io.c   |   33 +++---
 fs/btrfs/file.c|  114 ++--
 fs/btrfs/inode.c   |6 ++-
 5 files changed, 135 insertions(+), 62 deletions(-)
--
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


[GIT PULL] Btrfs fixes

2010-04-12 Thread Chris Mason
Hi Linus

The last pull was missing two fixes, which you can find in the
master branch of the btrfs-unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Josef's commit helps close another enospc problem, and the other one
fixes an oops where we try to allocate a zero sized extent off the
drive.

Chris Mason (1) commits (+6/-0):
Btrfs: make sure the chunk allocator doesn't create zero length chunks

Josef Bacik (1) commits (+15/-5):
Btrfs: fix data enospc check overflow

Total: (2) commits

 fs/btrfs/extent-tree.c |   20 +++-
 fs/btrfs/volumes.c |6 ++
 2 files changed, 21 insertions(+), 5 deletions(-)
--
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