[haiku-bugs] [Haiku] #18137: VirtualMemory preflet: lists RAM FS Volume as valid swap file storage option

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 14 Dec 2022 16:33:03 -0000

#18137: VirtualMemory preflet: lists RAM FS Volume as valid swap file storage
option
-----------------------+--------------------------
 Reporter:  bipolar    |       Owner:  nobody
     Type:  bug        |      Status:  new
 Priority:  normal     |   Milestone:  Unscheduled
Component:  - General  |     Version:  R1/beta4
 Keywords:             |  Blocked By:
 Blocking:             |    Platform:  All
-----------------------+--------------------------
 As per the title:

 The VirtualMemory preflet shows the RAM FS volume (from
 /system/var/shared_memory) as an option of where to place the swap file
 (when auto-swap management option is off).

 That seems like a recipe for problems, right?  (I didn't dared to actually
 try it out).

 Anyway.... Any suggestions on how to better filter FSes like that so they
 don't pop up in VirtualMemory?

 ---

 A bit of a tangent:

 Seeing that VirtualMemory checks each `BVolume`'s `IsPersistent()` (among
 other fs_info flag related methods)... and reading the Be Book, that says:
 "IsPersistent() - Is the storage persistent (such as on a floppy or hard
 disk)?"

 I thought... why ramfs is setting B_FS_IS_PERSISTENT?

 (In an attempt to fix the issue with the VM preflet, I've tried removing
 B_FS_IS_PERSISTENT from ramfs, but that cause KDLs when you attempt to
 write to a RAMFS you just mounted).


 I guess "B_FS_IS_PERSISTENT/IsPersistent()" only means that an FS can
 store data, even if it is just temporarily?


 In that case... Is there a way to check for "the other meaning" of
 persistent (as in... "you can reasonably expect data to survives reboots"?
 (seems something backup software, for example, might care about).
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/18137>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: