file_systems: Overlay layers only support being mounted with super volumes.
Fixes #16669.
This commit is contained in:
@@ -1994,6 +1994,9 @@ static status_t
|
|||||||
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
|
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
|
||||||
const char *args, ino_t *rootID)
|
const char *args, ino_t *rootID)
|
||||||
{
|
{
|
||||||
|
if (volume->super_volume == NULL)
|
||||||
|
return B_UNSUPPORTED;
|
||||||
|
|
||||||
TRACE_VOLUME("mounting attribute overlay\n");
|
TRACE_VOLUME("mounting attribute overlay\n");
|
||||||
volume->private_volume = new(std::nothrow) OverlayVolume(volume);
|
volume->private_volume = new(std::nothrow) OverlayVolume(volume);
|
||||||
if (volume->private_volume == NULL)
|
if (volume->private_volume == NULL)
|
||||||
|
|||||||
@@ -1106,6 +1106,9 @@ static status_t
|
|||||||
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
|
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
|
||||||
const char *args, ino_t *rootID)
|
const char *args, ino_t *rootID)
|
||||||
{
|
{
|
||||||
|
if (volume->super_volume == NULL)
|
||||||
|
return B_UNSUPPORTED;
|
||||||
|
|
||||||
char filename[256];
|
char filename[256];
|
||||||
snprintf(filename, sizeof(filename), "%s%s", kLogFilePrefix, device);
|
snprintf(filename, sizeof(filename), "%s%s", kLogFilePrefix, device);
|
||||||
filename[sizeof(filename) - 1] = 0;
|
filename[sizeof(filename) - 1] = 0;
|
||||||
|
|||||||
@@ -2557,6 +2557,9 @@ static status_t
|
|||||||
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
|
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
|
||||||
const char *args, ino_t *rootID)
|
const char *args, ino_t *rootID)
|
||||||
{
|
{
|
||||||
|
if (volume->super_volume == NULL)
|
||||||
|
return B_UNSUPPORTED;
|
||||||
|
|
||||||
TRACE_VOLUME("mounting write overlay\n");
|
TRACE_VOLUME("mounting write overlay\n");
|
||||||
volume->private_volume = new(std::nothrow) OverlayVolume(volume);
|
volume->private_volume = new(std::nothrow) OverlayVolume(volume);
|
||||||
if (volume->private_volume == NULL)
|
if (volume->private_volume == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user