All of lore.kernel.org
 help / color / mirror / Atom feed
* btrfs scrub process prevents system suspend
@ 2014-03-20 15:21 Jakub Klinkovský
  2014-03-20 15:30 ` Josef Bacik
  2014-03-20 15:31 ` George Eleftheriou
  0 siblings, 2 replies; 5+ messages in thread
From: Jakub Klinkovský @ 2014-03-20 15:21 UTC (permalink / raw)
  To: linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 406 bytes --]

Today I accidentally discovered that it is not possible to suspend (hibernate)
the system while the btrfs scrub process is running (see the attached log).
Could this be considered a bug, or did I miss something?

Some more info:

$ uname -a
Linux asusntb 3.13.6-1-ARCH #1 SMP PREEMPT Fri Mar 7 22:47:48 CET 2014 x86_64 GNU/Linux

and btrfs-progs-3.12 is installed.

Regards,
Jakub Klinkovský

[-- Attachment #1.2: btrfs_scrub_hibernate.log --]
[-- Type: text/plain, Size: 3336 bytes --]

Mar 20 09:03:13 asusntb systemd[1]: Starting Sleep.
Mar 20 09:03:13 asusntb systemd[1]: Reached target Sleep.
Mar 20 09:03:13 asusntb systemd[1]: Starting Hibernate...
Mar 20 09:03:13 asusntb systemd-sleep[12696]: Suspending system...
Mar 20 09:03:34 asusntb kernel: PM: Syncing filesystems ... done.
Mar 20 09:03:34 asusntb kernel: Freezing user space processes ...
Mar 20 09:03:34 asusntb kernel: Freezing of tasks failed after 20.004 seconds (1 tasks refusing to freeze, wq_busy=0):
Mar 20 09:03:34 asusntb kernel: btrfs           D 00000000ffffffff     0  9695      1 0x00000004
Mar 20 09:03:34 asusntb kernel:  ffff880101249920 0000000000000082 ffff8800baf02400 ffff880101249fd8
Mar 20 09:03:34 asusntb kernel:  0000000000014440 0000000000014440 ffff8800baf02400 ffff8800baf02400
Mar 20 09:03:34 asusntb kernel:  0000000000000001 ffff8800baf02400 ffff88013fff9b08 ffff8800baf02400
Mar 20 09:03:34 asusntb kernel: Call Trace:
Mar 20 09:03:34 asusntb kernel:  [<ffffffff8117e5c3>] ? alloc_pages_current+0xa3/0x160
Mar 20 09:03:34 asusntb kernel:  [<ffffffff81515d99>] schedule+0x29/0x70
Mar 20 09:03:34 asusntb kernel:  [<ffffffffa0c2df3d>] scrub_pages+0x38d/0x4e0 [btrfs]
Mar 20 09:03:34 asusntb kernel:  [<ffffffff810a2c30>] ? __wake_up_sync+0x20/0x20
Mar 20 09:03:34 asusntb kernel:  [<ffffffffa0c2eb68>] scrub_stripe+0x998/0x1110 [btrfs]
Mar 20 09:03:34 asusntb kernel:  [<ffffffffa0bd7a06>] ? btrfs_buffer_uptodate+0x56/0x80 [btrfs]
Mar 20 09:03:34 asusntb kernel:  [<ffffffffa0c30bdb>] scrub_chunk.isra.12+0x10b/0x130 [btrfs]
Mar 20 09:03:34 asusntb kernel:  [<ffffffffa0c30e54>] scrub_enumerate_chunks+0x254/0x510 [btrfs]
Mar 20 09:03:34 asusntb kernel:  [<ffffffff810a2c00>] ? __wake_up_sync_key+0x50/0x60
Mar 20 09:03:34 asusntb kernel:  [<ffffffffa0c312ac>] btrfs_scrub_dev+0x19c/0x4f0 [btrfs]
Mar 20 09:03:34 asusntb kernel:  [<ffffffffa0c0f078>] btrfs_ioctl+0x1528/0x27a0 [btrfs]
Mar 20 09:03:34 asusntb kernel:  [<ffffffff8107b5a6>] ? __queue_work+0x136/0x360
Mar 20 09:03:34 asusntb kernel:  [<ffffffff8151d5c4>] ? __do_page_fault+0x2c4/0x5b0
Mar 20 09:03:34 asusntb kernel:  [<ffffffff81292716>] ? put_io_context+0x66/0xa0
Mar 20 09:03:34 asusntb kernel:  [<ffffffff811b6080>] do_vfs_ioctl+0x2e0/0x4c0
Mar 20 09:03:34 asusntb kernel:  [<ffffffff811b62e1>] SyS_ioctl+0x81/0xa0
Mar 20 09:03:34 asusntb kernel:  [<ffffffff8151d8be>] ? do_page_fault+0xe/0x10
Mar 20 09:03:34 asusntb kernel:  [<ffffffff815216ad>] system_call_fastpath+0x1a/0x1f
Mar 20 09:03:34 asusntb kernel:
Mar 20 09:03:34 asusntb systemd-logind[246]: Lid closed.
Mar 20 09:03:34 asusntb kernel: Restarting tasks ... done.
Mar 20 09:03:34 asusntb kernel: video LNXVIDEO:00: Restoring backlight state
Mar 20 09:03:34 asusntb systemd[1]: systemd-hibernate.service: main process exited, code=exited, status=1/FAILURE
Mar 20 09:03:34 asusntb systemd[1]: Failed to start Hibernate.
Mar 20 09:03:34 asusntb systemd[1]: Dependency failed for Hibernate.
Mar 20 09:03:34 asusntb systemd[1]: Service sleep.target is not needed anymore. Stopping.
Mar 20 09:03:34 asusntb systemd[1]: Unit systemd-hibernate.service entered failed state.
Mar 20 09:03:34 asusntb systemd[1]: Stopping Sleep.
Mar 20 09:03:34 asusntb systemd[1]: Stopped target Sleep.
Mar 20 09:03:34 asusntb systemd[1]: Stopping Hibernate.
Mar 20 09:03:34 asusntb systemd[1]: Stopped target Hibernate.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: btrfs scrub process prevents system suspend
  2014-03-20 15:21 btrfs scrub process prevents system suspend Jakub Klinkovský
@ 2014-03-20 15:30 ` Josef Bacik
  2014-03-20 20:19   ` Marc MERLIN
  2014-03-20 15:31 ` George Eleftheriou
  1 sibling, 1 reply; 5+ messages in thread
From: Josef Bacik @ 2014-03-20 15:30 UTC (permalink / raw)
  To: Jakub Klinkovský, linux-btrfs

On 03/20/2014 11:21 AM, Jakub Klinkovský wrote:
> Today I accidentally discovered that it is not possible to suspend (hibernate)
> the system while the btrfs scrub process is running (see the attached log).
> Could this be considered a bug, or did I miss something?
>
> Some more info:
>
> $ uname -a
> Linux asusntb 3.13.6-1-ARCH #1 SMP PREEMPT Fri Mar 7 22:47:48 CET 2014 x86_64 GNU/Linux
>
> and btrfs-progs-3.12 is installed.
>

Yeah there's a way to make suspend run commands while it goes down, 
you'll want to make it do btrfs scrub cancel on your btrfs fses.  If you 
search the archives you'll see we've covered this recently and the guy 
posted the script he was using.  Thanks,

Josef


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

* Re: btrfs scrub process prevents system suspend
  2014-03-20 15:21 btrfs scrub process prevents system suspend Jakub Klinkovský
  2014-03-20 15:30 ` Josef Bacik
@ 2014-03-20 15:31 ` George Eleftheriou
  2014-03-20 16:37   ` Jakub Klinkovský
  1 sibling, 1 reply; 5+ messages in thread
From: George Eleftheriou @ 2014-03-20 15:31 UTC (permalink / raw)
  To: Jakub Klinkovský; +Cc: linux-btrfs

Hi,

I think this issue came up recently. You can read more about it here:

http://comments.gmane.org/gmane.comp.file-systems.btrfs/33106

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

* Re: btrfs scrub process prevents system suspend
  2014-03-20 15:31 ` George Eleftheriou
@ 2014-03-20 16:37   ` Jakub Klinkovský
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Klinkovský @ 2014-03-20 16:37 UTC (permalink / raw)
  To: George Eleftheriou; +Cc: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

On 20.03.14 at 16:31, George Eleftheriou wrote:
> Hi,
> 
> I think this issue came up recently. You can read more about it here:
> 
> http://comments.gmane.org/gmane.comp.file-systems.btrfs/33106

Thank you for the link and apologies for the noise.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: btrfs scrub process prevents system suspend
  2014-03-20 15:30 ` Josef Bacik
@ 2014-03-20 20:19   ` Marc MERLIN
  0 siblings, 0 replies; 5+ messages in thread
From: Marc MERLIN @ 2014-03-20 20:19 UTC (permalink / raw)
  To: Josef Bacik; +Cc: Jakub Klinkovský, linux-btrfs

On Thu, Mar 20, 2014 at 11:30:33AM -0400, Josef Bacik wrote:
> Yeah there's a way to make suspend run commands while it goes down, 
> you'll want to make it do btrfs scrub cancel on your btrfs fses.  If you 
> search the archives you'll see we've covered this recently and the guy 
> posted the script he was using.  Thanks,

I've started putting some of the recent stuff I've written and found out in
blog posts so that google can index them more easily.

This one has my btrfs scrub script and sec.conf to catch errors that btrfs
reports to syslog that that most would miss:
http://marc.merlins.org/perso/btrfs/post_2014-03-19_Btrfs-Tips_-Btrfs-Scrub-and-Btrfs-Filesystem-Repair.html
(also explains the different data recovery strategy and why you don't really
need fsck)

Then this one deals specifically with cancelling btrfs scrubs before going
to sleep:
http://marc.merlins.org/perso/btrfs/post_2014-03-20_Btrfs-Tips_-ACPI-S3-Sleep-aka-Suspend-And-Btrfs-Scrub.html
My guess is that pause/resume might be enough, I just haven't spent the time
on doing that yet.

Cheers,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  

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

end of thread, other threads:[~2014-03-20 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-20 15:21 btrfs scrub process prevents system suspend Jakub Klinkovský
2014-03-20 15:30 ` Josef Bacik
2014-03-20 20:19   ` Marc MERLIN
2014-03-20 15:31 ` George Eleftheriou
2014-03-20 16:37   ` Jakub Klinkovský

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