Fix 3785 - F2FS parameters require 'extra_attr' (#3796)

Co-authored-by: Daniel Girtler <dgirtler@atlassian.com>
This commit is contained in:
Daniel Girtler 2025-09-17 18:32:04 +10:00 committed by GitHub
parent de05dcb7e0
commit d256e70480
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -271,9 +271,12 @@ class DeviceHandler:
options = [] options = []
match fs_type: match fs_type:
case FilesystemType.Btrfs | FilesystemType.F2fs | FilesystemType.Xfs: case FilesystemType.Btrfs | FilesystemType.Xfs:
# Force overwrite # Force overwrite
options.append('-f') options.append('-f')
case FilesystemType.F2fs:
options.append('-f')
options.extend(('-O', 'extra_attr'))
case FilesystemType.Ext2 | FilesystemType.Ext3 | FilesystemType.Ext4: case FilesystemType.Ext2 | FilesystemType.Ext3 | FilesystemType.Ext4:
# Force create # Force create
options.append('-F') options.append('-F')
@ -814,8 +817,8 @@ class DeviceHandler:
def _wipe(self, dev_path: Path) -> None: def _wipe(self, dev_path: Path) -> None:
""" """
Wipe a device (partition or otherwise) of meta-data, be it file system, LVM, etc. Wipe a device (partition or otherwise) of meta-data, be it file system, LVM, etc.
@param dev_path: Device path of the partition to be wiped. @param dev_path: Device path of the partition to be wiped.
@type dev_path: str @type dev_path: str
""" """
with open(dev_path, 'wb') as p: with open(dev_path, 'wb') as p:
p.write(bytearray(1024)) p.write(bytearray(1024))