Mount image sessions immediately. 70/324670/2
authorMichal Bloch <m.bloch@samsung.com>
Thu, 22 May 2025 12:18:27 +0000 (14:18 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Thu, 22 May 2025 14:03:29 +0000 (16:03 +0200)
Change-Id: Id86481e508ef8659b51be3595f4954d07b891f0d

src/service/src/dir_backend_fixed_size.cpp

index f564a0714fd626ad0d54ad3ed938bbdec34a863b..bb7ae4083a53b3dfd76d1fbe1e36c1961c91d9c5 100644 (file)
@@ -122,6 +122,11 @@ void DirBackendAddFixedSize::AddSubsessionFinalize (const fs::path& tmpdir_path,
         * since all other logic assumes that the existence of the dir
         * signifies that a valid subsession exists. */
        fs::rename(tmpdir_path, subsession_path);
+
+       /* Subsessions must always be mounted, even before they
+        * are switched to, so that they can be kept up to date
+        * by external updates (e.g. at package installation). */
+       OS::do_mount(image_path, subsession_path);
 }
 
 void DirBackendFixedSize::RemoveSubsession (const fs::path& subsession_path) const