All of lore.kernel.org
 help / color / mirror / Atom feed
* why does df spin up disks?
@ 2015-06-29  1:43 Russell Coker
  2015-06-29  7:13 ` Holger Hoffstätte
  0 siblings, 1 reply; 2+ messages in thread
From: Russell Coker @ 2015-06-29  1:43 UTC (permalink / raw)
  To: linux-btrfs

When I have a mounted filesystem why doesn't the kernel store the amount of 
free space?  Why does it need to spin up a disk that had been spun down?

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

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

* Re: why does df spin up disks?
  2015-06-29  1:43 why does df spin up disks? Russell Coker
@ 2015-06-29  7:13 ` Holger Hoffstätte
  0 siblings, 0 replies; 2+ messages in thread
From: Holger Hoffstätte @ 2015-06-29  7:13 UTC (permalink / raw)
  To: linux-btrfs

On 06/29/15 03:43, Russell Coker wrote:
> When I have a mounted filesystem why doesn't the kernel store the amount of 
> free space?  Why does it need to spin up a disk that had been spun down?

Most likely because the inode has been evicted due to memory pressure. I can df my mostly-idle backup disk "most" of the time without it spinning up once it has been mounted & gone to sleep (just did!), but if there's been significant memory movement (or issuing drop_caches) on the box it will spin up again sometimes. This is not unique to btrfs; other filesystems - at least ext4 - do this too, even though they might manage their expiry behaviour differently.

Now, whether the root inode and whatever is required for a df *should* ever expire after mounting or stay pinned, well..you'd have to ask the vfs folks.

-h


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

end of thread, other threads:[~2015-06-29  7:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-29  1:43 why does df spin up disks? Russell Coker
2015-06-29  7:13 ` Holger Hoffstätte

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.