Re: dm-thinp: stable commits and their dependent commits: fixes pool space leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I just want to make sure this was seen, so intentional top post.  Please 
have a look when you have a moment, it would be great to see the dm-thinp 
pool free space leak get plugged in stable.

This thread (original email below) includes dependent commits of commits 
marked stable with cherry-pick ordering.

Relatedly, the other thread on about dm-thinp contains only commits marked 
with Cc: stable@xxxxxxxxxxxxxxx and they aren't yet in 4.1.20:
  http://article.gmane.org/gmane.linux.kernel.stable/167132

We have tested this commit series for months and it works great.  Please 
let me know if I can be of any help getting these into 4.1.y.  Thanks!


--
Eric Wheeler

On Fri, 11 Mar 2016, Eric Wheeler wrote:

> Hello all,
> 
> (This email's commits are different from thiose in the thread "dm commits 
> marked Cc: stable but missing from 4.1", however related.)
> 
> There has been a pool free space leak in dm-thinp which has been fixed in 
> later kernels, but not yet in 4.1.y.  We've been hand cherry-picking the 
> necessary commits to 4.1.y to fix that problem.
> 
> Of course there is some red tape here: some commits exceed 100 lines and 
> others, while dependent on a commit marked stable@xxxxxxxxxxxxxxx, are not 
> marked stable themselves.  All commits are in linus's tree.  All commits 
> listed below fit the following:
>   * they are directly marked as stable themselves, or 
>   * are dependent of those stable commits, or
>   * are fixups necessary for the commits marked for stable inclusion.
> 
> We have been using these in production since 4.1.15 and I would like to 
> see what can be done to get those fixes merged into 4.1.y.  They work 
> great for us with 2+ months of testing. 
> 
> The diffstat for the entire patchset against 4.1.19:
> 
> # git diff --stat v4.1.19
>  block/bio-integrity.c                        |   4 +-
>  block/bio.c                                  |  77 +--
>  drivers/md/bcache/io.c                       |   2 +-
>  drivers/md/bcache/request.c                  |   2 +-
>  drivers/md/dm-cache-target.c                 |   6 -
>  drivers/md/dm-raid1.c                        |   2 -
>  drivers/md/dm-snap.c                         |   1 -
>  drivers/md/dm-thin-metadata.c                | 129 +++++
>  drivers/md/dm-thin-metadata.h                |  11 +
>  drivers/md/dm-thin.c                         | 595 ++++++++++++++++++------
>  drivers/md/dm-verity.c                       |   2 +-
>  drivers/md/persistent-data/dm-btree-remove.c | 130 ++++++
>  drivers/md/persistent-data/dm-btree.c        |  81 ++++
>  drivers/md/persistent-data/dm-btree.h        |  17 +
>  fs/btrfs/disk-io.c                           |   2 +-
>  fs/btrfs/volumes.c                           |  18 +-
>  fs/btrfs/volumes.h                           |   2 -
>  fs/xfs/xfs_aops.c                            |   1 -
>  include/linux/bio.h                          |  17 +-
>  include/linux/blk_types.h                    |   6 +-
>  20 files changed, 886 insertions(+), 219 deletions(-)
> 
> 
> Wow, 886 inserts?  For a stable commit?  Well lets break it down:
> 
> 
> These are listed in the commit order that (hopefully) makes the most sense 
> of dependent ordering.  If you see that I have marked a shortlog line with 
> "[STABLE]", that means the commit contains 'Cc: stable@xxxxxxxxxxxxxxx':
> 
> # Dependancies for stable commits 993ceab9 and b0dc3c8b:
> 4ec331c3ea7ec94f28aa1c62a279cfa1cfe3c91b dm btree: add dm_btree_remove_leaves() Removes a range of leaf values
> 6550f075f5087459f64c1af71298fc50b102af11 dm thin metadata: add dm_thin_remove_range()
>  drivers/md/dm-thin-metadata.c                |  54 ++++++++++
>  drivers/md/dm-thin-metadata.h                |   2 +
>  drivers/md/persistent-data/dm-btree-remove.c | 127 ++++++++++++++++++++++++
>  drivers/md/persistent-data/dm-btree.h        |   9 ++
>  4 files changed, 192 insertions(+)
> 
> # These next two stable commits depend on 4ec331c3,6550f075:
> 993ceab91986e2e737ce9a3e23bebc8cce649240 [STABLE] dm thin metadata: fix bug in dm_thin_remove_range()
>  Cc: stable@xxxxxxxxxxxxxxx # 4.1+
>  drivers/md/dm-thin-metadata.c         | 28 +++++++++--
>  drivers/md/persistent-data/dm-btree.c | 81 ++++++++++++++++++++++++++++++++
>  drivers/md/persistent-data/dm-btree.h | 14 ++++--
>  3 files changed, 115 insertions(+), 8 deletions(-)
> 
> 
> b0dc3c8bc157c60b1d470163882be8c13e1950af [STABLE] dm btree: add ref counting ops for the leaves of top level btrees
>  Cc: stable@xxxxxxxxxxxxxxx
>  drivers/md/persistent-data/dm-btree-internal.h |  6 ++++
>  drivers/md/persistent-data/dm-btree-remove.c   | 16 ++++------
>  drivers/md/persistent-data/dm-btree-spine.c    | 37 +++++++++++++++++++++++
>  drivers/md/persistent-data/dm-btree.c          |  7 +----
>  4 files changed, 50 insertions(+), 16 deletions(-)
> 
> 
> # Depends for stable commit 216076
> a5d895a90bf57e5fe87edf48dd1852e7292d570d dm thin metadata: add dm_thin_find_mapped_range()
> 34fbcf6257eb3f39a5b78a4f51b40f881b82033b dm thin: range discard support
> 216076705d6ac291d42e0f8dd85e6a0da98c0fa3 [STABLE] dm thin: disable discard support for thin devices if pool's is disabled 
>  Cc: stable@xxxxxxxxxxxxxxx # 4.1+
>  drivers/md/dm-thin-metadata.c |  57 ++++
>  drivers/md/dm-thin-metadata.h |   9 +
>  drivers/md/dm-thin.c          | 587 +++++++++++++++++++++++++++++----------
>  3 files changed, 504 insertions(+), 149 deletions(-)
> 
> 
> # Depends on stable commit 216076
> 0fcb04d59351f790efb8da18edefd6ab4d9bbf3b [STABLE] dm thin: fix regression in advertised discard limits
>  Cc: stable@xxxxxxxxxxxxxxx # 4.1+
>  drivers/md/dm-thin.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> # Not marked stable, but should be included as stable:
> aa0cd28d057fd4cb686fbdd2475a6a3f609dd581 dm btree remove: fix bug in remove_one() [depends on 4ec331c3]
>  drivers/md/persistent-data/dm-btree-remove.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 
> # These fixup patches Were merged in v4.2, and are needed to fix an 
> # off-by-one bug for range discard support: These probably should be 
> # marked stable in general, but thats a better question for Jens.  In any 
> # event, they are necessary for the stability of the dm-thinp stability 
> # commits above:
> 
> c4cf5261f8bffd9de132b50660a69148e7575bd6 bio: skip atomic inc/dec of ->bi_remaining for non-chains
> dac56212e8127dbc0bff7be35c508bc280213309 bio: skip atomic inc/dec of ->bi_cnt for most use cases
> 326e1dbb57368087a36607aaebe9795b8d5453e5 block: remove management of bi_remaining when restoring original bi_end_io
>  drivers/md/dm-thin.c | 586 ++++++++++++++++++++++++++++++++++++------------
>  1 file changed, 437 insertions(+), 149 deletions(-)
> 
> 
> To summarize, this is the `git log --oneline` of our 
> v4.1.19-dm-thin-stable branch, including the other stable commits listed 
> in the other thread "dm commits marked Cc: stable but missing from 4.1"
> 
> 36fcd68 block: remove management of bi_remaining when restoring original bi_end_io
> 88c59a5 bio: skip atomic inc/dec of ->bi_cnt for most use cases
> b2b855f bio: skip atomic inc/dec of ->bi_remaining for non-chains
> a60282f dm btree remove: fix bug in remove_one()
> 29b0b49 dm thin: fix regression in advertised discard limits
> d56fa45 dm thin: disable discard support for thin devices if pool's is disabled
> 404585f dm thin: range discard support
> 69b5cec dm thin metadata: add dm_thin_find_mapped_range()
> 9f10f94 dm btree: add ref counting ops for the leaves of top level btrees
> 26b0b84 dm thin metadata: fix bug in dm_thin_remove_range()
> a580b1b dm thin metadata: add dm_thin_remove_range()
> 3103588 dm btree: add dm_btree_remove_leaves()
> 00996c3 dm: initialize non-blk-mq queue data before queue is used
> 1489b74 dm thin: restore requested 'error_if_no_space' setting on OODS to WRITE transition
> 5c86b0c dm btree: fix leak of bufio-backed block in btree_split_sibling error path
> 5919436 dm thin metadata: fix bug when taking a metadata snapshot
> 22806ea dm space map metadata: fix ref counting bug when bootstrapping a new space map
> 99059bc dm btree: fix bufio buffer leaks in dm_btree_del() error path
> b9a9cfd Linux 4.1.19
> 
> 
> --
> Eric Wheeler
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]