[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2018-01-17 Thread Launchpad Bug Tracker
This bug was fixed in the package btrfs-tools - 3.12-1ubuntu0.2

---
btrfs-tools (3.12-1ubuntu0.2) trusty; urgency=medium

  * Cherry-pick upstream fix loop device mount checks
(LP: #1735046)

 -- Ryan Harper   Wed, 29 Nov 2017 13:44:30
-0600

** Changed in: btrfs-tools (Ubuntu Trusty)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2018-01-16 Thread Scott Moser
** Tags removed: verification-needed
** Tags added: verification-done

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2018-01-11 Thread Ryan Harper
I tested the proposed package and it works as expected.

root@t-unsubsidized-piper:~# lsb_release -rd
Description:Ubuntu 14.04.5 LTS
Release:14.04

root@t-unsubsidized-piper:~# uname -r
3.13.0-137-generic

First, I confirmed it still fails on 3.12-1ubuntu0.1

root@t-unsubsidized-piper:~# truncate -s 1G testloop.img
root@t-unsubsidized-piper:~# losetup /dev/loop0 testloop.img
root@t-unsubsidized-piper:~# mkfs.ext4 /dev/loop0
mke2fs 1.42.9 (4-Feb-2014)
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376

Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

root@t-unsubsidized-piper:~# mount /dev/loop0 /mnt
root@t-unsubsidized-piper:~# rm testloop.img
root@t-unsubsidized-piper:~# mkfs.btrfs --force /dev/vdb
Error: error checking /dev/vdb mount status
root@t-unsubsidized-piper:~# echo $?
1

Next I added trusty-proposed and updated

root@t-unsubsidized-piper:~# apt-cache policy btrfs-tools
btrfs-tools:
  Installed: 3.12-1ubuntu0.1
  Candidate: 3.12-1ubuntu0.2
  Version table:
 3.12-1ubuntu0.2 0
500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-proposed/main 
amd64 Packages
 *** 3.12-1ubuntu0.1 0
500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-updates/main 
amd64 Packages
100 /var/lib/dpkg/status
 3.12-1 0
500 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty/main amd64 
Packages

After installing the upgrade, I repeated the mkfs.btrfs command, but
this time it succeeds

# sudo apt install btrfs-tools
sudo: unable to resolve host t-unsubsidized-piper
Reading package lists... Done
Building dependency tree   
Reading state information... Done
The following packages will be upgraded:
  btrfs-tools
1 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Need to get 332 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://nova.clouds.archive.ubuntu.com/ubuntu/ trusty-proposed/main 
btrfs-tools amd64 3.12-1ubuntu0.2 [332 kB]
Fetched 332 kB in 0s (827 kB/s) 
(Reading database ... 51345 files and directories currently installed.)
Preparing to unpack .../btrfs-tools_3.12-1ubuntu0.2_amd64.deb ...
Unpacking btrfs-tools (3.12-1ubuntu0.2) over (3.12-1ubuntu0.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up btrfs-tools (3.12-1ubuntu0.2) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.103ubuntu4.10) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-137-generic
Processing triggers for libc-bin (2.19-0ubuntu6.13) ...
root@t-unsubsidized-piper:~# mkfs.btrfs --force /dev/vdb

WARNING! - Btrfs v3.12 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
fs created label (null) on /dev/vdb
nodesize 16384 leafsize 16384 sectorsize 4096 size 40.00GiB
Btrfs v3.12
root@t-unsubsidized-piper:~# echo $?
0


** Tags removed: verification-needed-trusty
** Tags added: verification-done-trusty

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2017-12-21 Thread Brian Murray
Hello Ryan, or anyone else affected,

Accepted btrfs-tools into trusty-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/btrfs-
tools/3.12-1ubuntu0.2 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-trusty to verification-done-trusty. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-trusty. In either case, without details of
your testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: btrfs-tools (Ubuntu Trusty)
   Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-trusty

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2017-12-20 Thread Scott Moser
I just marked xenial explicitly as fixed here.  The fix is in all
supported ubuntu releases > trusty.


** Also affects: btrfs-tools (Ubuntu Trusty)
   Importance: Undecided
   Status: New

** Changed in: btrfs-tools (Ubuntu)
   Status: New => Fix Released

** Changed in: btrfs-tools (Ubuntu Trusty)
   Status: New => In Progress

** Changed in: btrfs-tools (Ubuntu Trusty)
   Importance: Undecided => Medium

** Changed in: btrfs-tools (Ubuntu Trusty)
 Assignee: (unassigned) => Ryan Harper (raharper)

** Also affects: btrfs-tools (Ubuntu Xenial)
   Importance: Undecided
   Status: New

** Changed in: btrfs-tools (Ubuntu Xenial)
   Status: New => Fix Released

** Changed in: btrfs-tools (Ubuntu Xenial)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2017-12-15 Thread Ryan Harper
** Description changed:

+ SRU Template
+ 
+ [Impact]
+ 
+  * Users may be unable to successfully create a btrfs filesystem on 
+block devices when a loop device is mounted and the backing file
+no longer exists.  This typically happens in the precense of
+overlayroot but may be encountered in other situations.
+ 
+This affects the btrfs-tools package prior to the 3.13 release.
+
+  * Backporting the fix from the upstream repository is required to
+allow Trusty MAAS/Cloud images which use overlayrootfs to create
+btrfs filesystems in the presence of a loopdevice with a missing
+backing file.
+ 
+  * All patches applied are already accepted upstream.  Xenial, Artful,
+and Bionic are not affected.
+
+ 
+ [Test Case]
+ 
+  * On a Trusty 14.04 system with a secondary disk (vdb)
+ - apt-get install btrfs-tools
+ - truncate -s 1G testloop.img
+ - losetup /dev/loop0 testloop.img
+ - mkfs.ext4 /dev/loop0
+ - mount /dev/loop0 /mnt
+ - rm testloop.img
+ - mkfs.btrfs --force /dev/vdb
+ 
+ PASS if mkfs.btrfs returns 0 and /dev/vdb has a btrfs filesystem
+ 
+ FAIL if mkfs.btrfs returns non-zero and /dev/vdb does not have a
+ btrfs filesystem.  mkfs.btrfs returns the error message:
+ 
+ Error: error checking /dev/vdb mount status
+ 
+ [Regression Potential]
+ 
+  * mkfs.btrfs fails to detect that the target device is already mounted
+and an existing btrfs filesystem is destroyed.
+ 
+ 
+ [Original Description]
  # lsb_release -rd
  Description:Ubuntu 14.04.5 LTS
  Release:14.04
  
  # apt-cache policy btrfs-tools
  btrfs-tools:
-   Installed: 3.12-1ubuntu0.1
-   Candidate: 3.12-1ubuntu0.1
-   Version table:
-  *** 3.12-1ubuntu0.1 0
- 500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 
Packages
- 100 /var/lib/dpkg/status
-  3.12-1 0
- 500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
+   Installed: 3.12-1ubuntu0.1
+   Candidate: 3.12-1ubuntu0.1
+   Version table:
+  *** 3.12-1ubuntu0.1 0
+ 500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 
Packages
+ 100 /var/lib/dpkg/status
+  3.12-1 0
+ 500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
  
  # mkfs.btrfs --force /dev/vdd   succeeds
  
- # # mkfs.btrfs --force /dev/vdd 
+ # # mkfs.btrfs --force /dev/vdd
  Error: error checking /dev/vdd mount status
  
  # strace -f mkfs.btrfs --force /dev/vdd
  
  stat("/dev/loop0", {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
  lstat("/dev", {st_mode=S_IFDIR|0755, st_size=4180, ...}) = 0
  lstat("/dev/loop0", {st_mode=S_IFBLK|0660, st_rdev=makedev(7, 0), ...}) = 0
  open("/sys/block//loop0/loop/backing_file", O_RDONLY) = 5
  fstat(5, {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fe8bd73c000
  read(5, "/root.tmp.img (deleted)\n", 4096) = 24
  close(5)= 0
  munmap(0x7fe8bd73c000, 4096)= 0
  lstat("/dev", {st_mode=S_IFDIR|0755, st_size=4180, ...}) = 0
  lstat("/dev/vdd", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 48), ...}) = 0
  lstat("/root.tmp.img (deleted)", 0x7ffeaa3f0bf0) = -1 ENOENT (No such file or 
directory)
  close(4)= 0
  munmap(0x7fe8bd73d000, 4096)= 0
  close(3)= 0
  write(2, "Error: error checking /dev/vdd m"..., 44Error: error checking 
/dev/vdd mount status
  ) = 44
  exit_group(1)   = ?
  +++ exited with 1 +++
  
  It appears that mkfs.btrfs doesn't like the loop device, /dev/loop0
  which has a deleted backing file.
  
- root@ubuntu:~# cat /sys/block/loop0/loop/backing_file 
+ root@ubuntu:~# cat /sys/block/loop0/loop/backing_file
  /root.tmp.img (deleted)
  root@ubuntu:~# ls -al /root.tmp.img
  ls: cannot access /root.tmp.img: No such file or directory
  
  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: btrfs-tools 3.12-1ubuntu0.1
  ProcVersionSignature: Ubuntu 3.13.0-135.184-generic 3.13.11-ckt39
  Uname: Linux 3.13.0-135-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3.27
  Architecture: amd64
  Date: Wed Nov 29 02:58:04 2017
  ProcEnviron:
-  TERM=vt102
-  PATH=(custom, no user)
-  LANG=en_US.UTF-8
-  SHELL=/bin/bash
+  TERM=vt102
+  PATH=(custom, no user)
+  LANG=en_US.UTF-8
+  SHELL=/bin/bash
  SourcePackage: btrfs-tools
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2017-12-01 Thread Mathew Hodson
** Changed in: btrfs-tools (Ubuntu)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2017-11-29 Thread Ubuntu Foundations Team Bug Bot
The attachment "btrfs-tools-fix-lp1735046.debdiff" seems to be a
debdiff.  The ubuntu-sponsors team has been subscribed to the bug report
so that they can review and hopefully sponsor the debdiff.  If the
attachment isn't a patch, please remove the "patch" flag from the
attachment, remove the "patch" tag, and if you are member of the
~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issue please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1735046] Re: mkfs.btrfs error checking mount status of loop device backing_file

2017-11-29 Thread Ryan Harper
Cherry pick upstream commit which resolves dealing with loopfiles when
doing mount checks.

https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-
progs.git/commit/?id=d06b30feb9cb99e3684b5709159ca59cf811f517

I've built a deb from this and tested that this works when a loopdevice
is mounted.


** Patch added: "btrfs-tools-fix-lp1735046.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+attachment/5016421/+files/btrfs-tools-fix-lp1735046.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1735046

Title:
  mkfs.btrfs error checking mount status of loop device backing_file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/btrfs-tools/+bug/1735046/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs