* unlinked orphans. @ 2013-12-23 6:27 Nacho Man 2013-12-23 9:39 ` Hugo Mills 2013-12-23 17:16 ` Chris Murphy 0 siblings, 2 replies; 7+ messages in thread From: Nacho Man @ 2013-12-23 6:27 UTC (permalink / raw) To: linux-btrfs Hello, I ran dmesg and saw a bunch of these: [564421.874063] BTRFS debug (device sda2): unlinked 32 orphans [568021.386733] BTRFS debug (device sda2): unlinked 32 orphans [569943.269610] BTRFS debug (device sda2): unlinked 32 orphans [570929.840278] BTRFS debug (device sda2): unlinked 32 orphans [570942.035251] BTRFS debug (device sda2): unlinked 33 orphans [571623.719086] BTRFS debug (device sda2): unlinked 32 orphans [572075.684003] BTRFS debug (device sda2): unlinked 32 orphans I just counted and there's a 175 of them. Do I have to worry? I've been working on a toolchain and some other stuff for the PS3 so my hard drive was being accessed a bit. Could it be related? Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: unlinked orphans. 2013-12-23 6:27 unlinked orphans Nacho Man @ 2013-12-23 9:39 ` Hugo Mills 2013-12-23 10:10 ` Duncan 2013-12-24 6:16 ` Nacho Man 2013-12-23 17:16 ` Chris Murphy 1 sibling, 2 replies; 7+ messages in thread From: Hugo Mills @ 2013-12-23 9:39 UTC (permalink / raw) To: Nacho Man; +Cc: linux-btrfs [-- Attachment #1: Type: text/plain, Size: 1582 bytes --] On Sun, Dec 22, 2013 at 10:27:17PM -0800, Nacho Man wrote: > Hello, > I ran dmesg and saw a bunch of these: > [564421.874063] BTRFS debug (device sda2): unlinked 32 orphans > [568021.386733] BTRFS debug (device sda2): unlinked 32 orphans > [569943.269610] BTRFS debug (device sda2): unlinked 32 orphans > [570929.840278] BTRFS debug (device sda2): unlinked 32 orphans > [570942.035251] BTRFS debug (device sda2): unlinked 33 orphans > [571623.719086] BTRFS debug (device sda2): unlinked 32 orphans > [572075.684003] BTRFS debug (device sda2): unlinked 32 orphans > > I just counted and there's a 175 of them. Do I have to worry? I've been working on a toolchain and some other stuff for the PS3 so my hard drive was being accessed a bit. Could it be related? Thanks. No, this is harmless. Orphans are files that were deleted while they were still held open by a process. POSIX semantics requires that the file data is still readable by the process, but that the file's hardlink(s) are no longer visible -- so there's no way of finding the file again by "normal" methods. Once the process closes the file, it is unlinked. With btrfs, making a snapshot of a subvolume with (still open) orphan files in it will close the orphans on the new copy, because they're new files. This leads to the messages above. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Ceci est un travail pour l'Australien. --- [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: unlinked orphans. 2013-12-23 9:39 ` Hugo Mills @ 2013-12-23 10:10 ` Duncan 2013-12-24 6:16 ` Nacho Man 1 sibling, 0 replies; 7+ messages in thread From: Duncan @ 2013-12-23 10:10 UTC (permalink / raw) To: linux-btrfs Hugo Mills posted on Mon, 23 Dec 2013 09:39:53 +0000 as excerpted: > On Sun, Dec 22, 2013 at 10:27:17PM -0800, Nacho Man wrote: >> I ran dmesg and saw a bunch of these: >> [564421.874063] BTRFS debug (device sda2): unlinked 32 orphans >> >> Do I have to worry? > No, this is harmless. Orphans are files that were deleted while > they were still held open by a process. POSIX semantics requires that > the file data is still readable by the process, but that the file's > hardlink(s) are no longer visible -- so there's no way of finding the > file again by "normal" methods. Once the process closes the file, it is > unlinked. Cool. I knew delete worked that way on POSIX filesystems[1], and I'd seen various posts on this list with unlinking X orphans logs, but I had no idea /that/ was what orphans referred too! New logical connection made. Thanks. =:^) > With btrfs, making a snapshot of a subvolume with (still open) > orphan files in it will close the orphans on the new copy, because > they're new files. This leads to the messages above. ... And that's entirely logical, once one actually knows what "orphans" are! =:^) --- [1] Someone posted a script to the gentoo-dev list at one point, that can be run after an update to go thru /proc and list the processes that have open but deleted files... because they've been replaced in the update. That way, an admin can see what still-running apps still have outdated and possibly vulnerable libraries loaded, and can choose to restart those apps, or leave them running, or look a bit closer at what libs that process depends on that were updated and why, before choosing to restart that process, as appropriate based on the risk factor for that process vs whether it's doing something important that can't be interrupted without losing data. Using that tool and seeing just what tends to need restarted after an update as well as how frequently, is what really drove home the principle here, but I didn't know what those deleted-but-still- open files were called, until your explanation just now. =:^) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: unlinked orphans. 2013-12-23 9:39 ` Hugo Mills 2013-12-23 10:10 ` Duncan @ 2013-12-24 6:16 ` Nacho Man 2014-01-02 16:04 ` David Sterba 1 sibling, 1 reply; 7+ messages in thread From: Nacho Man @ 2013-12-24 6:16 UTC (permalink / raw) To: Hugo Mills; +Cc: linux-btrfs On Monday, December 23, 2013 4:39 AM, Hugo Mills <hugo@carfax.org.uk> wrote: On Sun, Dec 22, 2013 at 10:27:17PM -0800, Nacho Man wrote: > Hello, > I ran dmesg and saw a bunch of these: > [564421.874063] BTRFS debug (device sda2): unlinked 32 orphans > [568021.386733] BTRFS debug (device sda2): unlinked 32 orphans > [569943.269610] BTRFS debug (device sda2): unlinked 32 orphans > [570929.840278] BTRFS debug (device sda2): unlinked 32 orphans > [570942.035251] BTRFS debug (device sda2): unlinked 33 orphans > [571623.719086] BTRFS debug (device sda2): unlinked 32 orphans > [572075.684003] BTRFS debug (device sda2): unlinked 32 orphans > > I just counted and there's a 175 of them. Do I have to worry? I've been working on a toolchain and some other stuff for the PS3 so my hard drive was being accessed a bit. Could it be related? Thanks. No, this is harmless. Orphans are files that were deleted while they were still held open by a process. POSIX semantics requires that the file data is still readable by the process, but that the file's hardlink(s) are no longer visible -- so there's no way of finding the file again by "normal" methods. Once the process closes the file, it is unlinked. Thank you very much. Is there a way to suppress these messages about orphaned files? I'd still like to see messages if something goes wrong, just not so much the orphaned files... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: unlinked orphans. 2013-12-24 6:16 ` Nacho Man @ 2014-01-02 16:04 ` David Sterba 0 siblings, 0 replies; 7+ messages in thread From: David Sterba @ 2014-01-02 16:04 UTC (permalink / raw) To: Nacho Man; +Cc: Hugo Mills, linux-btrfs On Mon, Dec 23, 2013 at 10:16:15PM -0800, Nacho Man wrote: > > > On Monday, December 23, 2013 4:39 AM, Hugo Mills <hugo@carfax.org.uk> wrote: > > On Sun, Dec 22, 2013 at 10:27:17PM -0800, Nacho Man wrote: > > Hello, > > I ran dmesg and saw a bunch of these: > > [564421.874063] BTRFS debug (device sda2): unlinked 32 orphans > > [568021.386733] BTRFS debug (device sda2): unlinked 32 orphans > > [569943.269610] BTRFS debug (device sda2): unlinked 32 orphans > > [570929.840278] BTRFS debug (device sda2): unlinked 32 orphans > > [570942.035251] BTRFS debug (device sda2): unlinked 33 orphans > > [571623.719086] BTRFS debug (device sda2): unlinked 32 orphans > > [572075.684003] BTRFS debug (device sda2): unlinked 32 orphans > > > > I just counted and there's a 175 of them. Do I have to worry? I've been working on a toolchain and some other stuff for the PS3 so my hard drive was being accessed a bit. Could it be related? Thanks. > > No, this is harmless. Orphans are files that were deleted while > they were still held open by a process. POSIX semantics requires that > the file data is still readable by the process, but that the file's > hardlink(s) are no longer visible -- so there's no way of finding the > file again by "normal" methods. Once the process closes the file, it > is unlinked. > > > Thank you very much. Is there a way to suppress these messages about > orphaned files? I'd still like to see messages if something goes > wrong, just not so much the orphaned files... The message level is 'debug', you can easily filter it out. david ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: unlinked orphans. 2013-12-23 6:27 unlinked orphans Nacho Man 2013-12-23 9:39 ` Hugo Mills @ 2013-12-23 17:16 ` Chris Murphy 2014-01-02 16:21 ` David Sterba 1 sibling, 1 reply; 7+ messages in thread From: Chris Murphy @ 2013-12-23 17:16 UTC (permalink / raw) To: Btrfs BTRFS On Dec 22, 2013, at 11:27 PM, Nacho Man <nacho2874@yahoo.com> wrote: > Hello, > I ran dmesg and saw a bunch of these: > [564421.874063] BTRFS debug (device sda2): unlinked 32 orphans I sometimes see a similar message (minus debug and device), but it occurs on every boot (rootfs is on Btrfs) and is persistent. If I temporarily add mount option recovery, then they get cleaned up. Expected? Chris Murphy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: unlinked orphans. 2013-12-23 17:16 ` Chris Murphy @ 2014-01-02 16:21 ` David Sterba 0 siblings, 0 replies; 7+ messages in thread From: David Sterba @ 2014-01-02 16:21 UTC (permalink / raw) To: Chris Murphy; +Cc: Btrfs BTRFS On Mon, Dec 23, 2013 at 10:16:33AM -0700, Chris Murphy wrote: > > On Dec 22, 2013, at 11:27 PM, Nacho Man <nacho2874@yahoo.com> wrote: > > > Hello, > > I ran dmesg and saw a bunch of these: > > [564421.874063] BTRFS debug (device sda2): unlinked 32 orphans > > I sometimes see a similar message (minus debug and device), but it > occurs on every boot (rootfs is on Btrfs) and is persistent. If I > temporarily add mount option recovery, then they get cleaned up. > Expected? Yes. The orphan files are cleaned during mount, so you could see it during boot. There might be orphaned yet uncleaned files left on the filesystem after a normal umount. I don't see how could -o recovery, affect that without any real recovery conditions, it's probably a coincidence that the messages do not appear. david ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-02 16:21 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-12-23 6:27 unlinked orphans Nacho Man 2013-12-23 9:39 ` Hugo Mills 2013-12-23 10:10 ` Duncan 2013-12-24 6:16 ` Nacho Man 2014-01-02 16:04 ` David Sterba 2013-12-23 17:16 ` Chris Murphy 2014-01-02 16:21 ` David Sterba
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.