Skip to content

Commit

Permalink
Merge pull request #871 from shundhammer/huha-mount-opts
Browse files Browse the repository at this point in the history
Don't add mount options that are default (ext2/3/4: acl, user_xattr)
  • Loading branch information
shundhammer committed Mar 20, 2019
2 parents 38629d3 + 35b9edd commit 1af7632
Show file tree
Hide file tree
Showing 16 changed files with 12 additions and 43 deletions.
9 changes: 4 additions & 5 deletions src/lib/y2storage/filesystems/type.rb
Expand Up @@ -77,18 +77,17 @@ class Type
name: "BtrFS"
},
ext2: {
fstab_options: COMMON_FSTAB_OPTIONS + EXT_FSTAB_OPTIONS,
default_fstab_options: ACL_OPTIONS,
name: "Ext2"
fstab_options: COMMON_FSTAB_OPTIONS + EXT_FSTAB_OPTIONS,
name: "Ext2"
},
ext3: {
fstab_options: COMMON_FSTAB_OPTIONS + EXT_FSTAB_OPTIONS + ["data="],
default_fstab_options: JOURNAL_OPTIONS + ACL_OPTIONS,
default_fstab_options: JOURNAL_OPTIONS,
name: "Ext3"
},
ext4: {
fstab_options: COMMON_FSTAB_OPTIONS + EXT_FSTAB_OPTIONS + ["data="],
default_fstab_options: JOURNAL_OPTIONS + ACL_OPTIONS,
default_fstab_options: JOURNAL_OPTIONS,
name: "Ext4"
},
hfs: {
Expand Down
2 changes: 1 addition & 1 deletion test/data/devicegraphs/btrfs_bcache.xml
Expand Up @@ -85,7 +85,7 @@
<sid>257</sid>
<path>/boot</path>
<mount-by>uuid</mount-by>
<mount-options>data=ordered,acl,user_xattr</mount-options>
<mount-options>data=ordered</mount-options>
<mount-type>ext4</mount-type>
<active>true</active>
<in-etc-fstab>true</in-etc-fstab>
Expand Down
2 changes: 0 additions & 2 deletions test/data/devicegraphs/dasd1.xml
Expand Up @@ -83,7 +83,6 @@
<sid>48</sid>
<path>/boot/zipl</path>
<mount-by>path</mount-by>
<mount-options>acl,user_xattr</mount-options>
<in-etc-fstab>true</in-etc-fstab>
<freq>0</freq>
<passno>0</passno>
Expand All @@ -108,7 +107,6 @@
<sid>52</sid>
<path>/</path>
<mount-by>path</mount-by>
<mount-options>acl,user_xattr</mount-options>
<in-etc-fstab>true</in-etc-fstab>
<freq>0</freq>
<passno>0</passno>
Expand Down
1 change: 0 additions & 1 deletion test/data/devicegraphs/md-imsm1-devicegraph.xml
Expand Up @@ -197,7 +197,6 @@
<sid>57</sid>
<path>/</path>
<mount-by>uuid</mount-by>
<mount-options>acl,user_xattr</mount-options>
<in-etc-fstab>true</in-etc-fstab>
<freq>0</freq>
<passno>0</passno>
Expand Down
3 changes: 0 additions & 3 deletions test/data/devicegraphs/output/empty_dasd_fba_gpt-sep-home.yml
Expand Up @@ -12,9 +12,6 @@
id: linux
file_system: ext2
mount_point: /boot/zipl
fstab_options:
- acl
- user_xattr

- partition:
size: 25685 MiB
Expand Down
Expand Up @@ -23,9 +23,6 @@
size: 30708 MiB
file_system: ext4
mount_point: "/"
fstab_options:
- acl
- user_xattr
- lvm_lv:
lv_name: var_lib_docker
size: 20 GiB
Expand Down
Expand Up @@ -14,9 +14,6 @@
id: linux
file_system: ext4
mount_point: "/"
fstab_options:
- acl
- user_xattr
- partition:
size: unlimited
name: "/dev/sda3"
Expand Down
2 changes: 0 additions & 2 deletions test/data/devicegraphs/output/ppc_power_nv-lvm.yml
Expand Up @@ -13,8 +13,6 @@
mount_point: "/boot"
fstab_options:
- data=ordered
- acl
- user_xattr
- partition:
size: unlimited
name: "/dev/sda2"
Expand Down
3 changes: 0 additions & 3 deletions test/data/devicegraphs/output/s390_dasd_zipl-lvm-sep-home.yml
Expand Up @@ -12,9 +12,6 @@
id: linux
file_system: ext2
mount_point: /boot/zipl
fstab_options:
- acl
- user_xattr
- partition:
size: 23809920 KiB (22.71 GiB)
name: "/dev/dasda2"
Expand Down
3 changes: 0 additions & 3 deletions test/data/devicegraphs/output/s390_dasd_zipl-lvm.yml
Expand Up @@ -12,9 +12,6 @@
id: linux
file_system: ext2
mount_point: "/boot/zipl"
fstab_options:
- acl
- user_xattr
- partition:
size: 23809920 KiB (22.71 GiB)
name: "/dev/dasda2"
Expand Down
3 changes: 0 additions & 3 deletions test/data/devicegraphs/output/s390_dasd_zipl.yml
Expand Up @@ -12,9 +12,6 @@
id: linux
file_system: ext2
mount_point: "/boot/zipl"
fstab_options:
- acl
- user_xattr
- partition:
size: 21712800 KiB (20.71 GiB)
name: "/dev/dasda2"
Expand Down
3 changes: 0 additions & 3 deletions test/data/devicegraphs/output/s390_zfcp_zipl.yml
Expand Up @@ -10,9 +10,6 @@
id: linux
file_system: ext2
mount_point: "/boot/zipl"
fstab_options:
- acl
- user_xattr
- partition:
size: 40 GiB
name: "/dev/sda2"
Expand Down
Expand Up @@ -22,8 +22,6 @@
mount_point: "/boot"
fstab_options:
- data=ordered
- acl
- user_xattr

- partition:
size: 53249 MiB
Expand Down
2 changes: 0 additions & 2 deletions test/data/devicegraphs/output/windows-pc-mbr256-lvm.yml
Expand Up @@ -22,8 +22,6 @@
mount_point: "/boot"
fstab_options:
- data=ordered
- acl
- user_xattr

- partition:
size: 43009 MiB
Expand Down
2 changes: 1 addition & 1 deletion test/data/devicegraphs/partitioned_btrfs_bcache.xml
Expand Up @@ -85,7 +85,7 @@
<sid>257</sid>
<path>/boot</path>
<mount-by>uuid</mount-by>
<mount-options>data=ordered,acl,user_xattr</mount-options>
<mount-options>data=ordered</mount-options>
<mount-type>ext4</mount-type>
<active>true</active>
<in-etc-fstab>true</in-etc-fstab>
Expand Down
12 changes: 6 additions & 6 deletions test/y2storage/filesystems/type_test.rb
Expand Up @@ -142,15 +142,15 @@
describe "#default_fstab_options" do
context "for locale-independent filesystem types" do
it "ext2 has the correct fstab options" do
expect(described_class::EXT2.default_fstab_options).to eq ["acl", "user_xattr"]
expect(described_class::EXT2.default_fstab_options).to eq []
end

it "ext3 has the correct fstab options" do
expect(described_class::EXT3.default_fstab_options).to eq ["data=ordered", "acl", "user_xattr"]
expect(described_class::EXT3.default_fstab_options).to eq ["data=ordered"]
end

it "ext4 has the correct fstab options" do
expect(described_class::EXT4.default_fstab_options).to eq ["data=ordered", "acl", "user_xattr"]
expect(described_class::EXT4.default_fstab_options).to eq ["data=ordered"]
end

it "xfs has the correct fstab options" do
Expand Down Expand Up @@ -186,15 +186,15 @@
context "for special paths" do
context "for root filesystems" do
it "ext2 has the correct fstab options" do
expect(described_class::EXT2.default_fstab_options("/")).to eq ["acl", "user_xattr"]
expect(described_class::EXT2.default_fstab_options("/")).to eq []
end

it "ext3 has the correct fstab options" do
expect(described_class::EXT3.default_fstab_options("/")).to eq ["acl", "user_xattr"]
expect(described_class::EXT3.default_fstab_options("/")).to eq []
end

it "ext4 has the correct fstab options" do
expect(described_class::EXT4.default_fstab_options("/")).to eq ["acl", "user_xattr"]
expect(described_class::EXT4.default_fstab_options("/")).to eq []
end
end

Expand Down

0 comments on commit 1af7632

Please sign in to comment.