Project

General

Profile

Actions

Bug #7767

closed

6464's call to mount() is incomplete

Added by Dan McDonald over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
lib - userland libraries
Start date:
2017-01-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

According to the mount(2) man page:

       The fstype argument is the file system type name. Standard file system
       names are defined with the prefix MNTTYPE_ in <sys/mntent.h>. If
       neither MS_DATA nor MS_OPTIONSTR is set in mflag, then fstype is
       ignored and the type of the root file system is assumed.

This causes beadm & friends to fail on non-ZFS root systems (like installers).


Related issues

Related to illumos gate - Bug #6464: libbe shouldn't mangle zfs mountpointsClosed2015-11-19

Actions
Actions #1

Updated by Dan McDonald over 6 years ago

  • Related to Bug #6464: libbe shouldn't mangle zfs mountpoints added
Actions #2

Updated by Toomas Soome over 6 years ago

  • Category set to lib - userland libraries
  • Status changed from New to In Progress
  • Assignee set to Toomas Soome
  • Priority changed from Normal to High
  • Difficulty changed from Medium to Bite-size
  • Tags deleted (needs-triage)

https://www.illumos.org/rb/r/321/

the fix is not just about adding the MS_OPTIONSTR to flag, but also it needs to provide the option string, even if empty, otherwise the mount will succeed but with EOVERFLOW.

Actions #3

Updated by Dale Ghent over 6 years ago

Tested this patch on a test SmartOS system. It was able to mount the zfs fs, when it could not earlier.

[root@ia-prodkvm-1 ~]# LD_PRELOAD=/root/libbe.so.1 ./beadm mount testbe /mnt
Mounted successfully on: '/mnt'
Actions #4

Updated by Electric Monk over 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 19f5167cc175d745bf9d9a007352b8784d628ac9

commit  19f5167cc175d745bf9d9a007352b8784d628ac9
Author: Toomas Soome <tsoome@me.com>
Date:   2017-01-14T02:22:06.000Z

    7767 6464's call to mount() is incomplete
    Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF