Skip to content

Commit 7b4e106

Browse files
committed
Refactor bitwise operations for clarity in server.py and update parameter name in _cleanup_load_resources function in main.py
Signed-off-by: Cong Wang <cwang@multikernel.io>
1 parent 39c35ad commit 7b4e106

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/kerf/fuse/server.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@
7070
FUSE_SETUPMAPPING = 48
7171
FUSE_REMOVEMAPPING = 49
7272

73-
FUSE_BIG_WRITES = (1 << 5)
74-
FUSE_DO_READDIRPLUS = (1 << 13)
75-
FUSE_READDIRPLUS_AUTO = (1 << 14)
76-
FUSE_WRITEBACK_CACHE = (1 << 16)
77-
FUSE_MAP_ALIGNMENT = (1 << 29)
78-
79-
FOPEN_KEEP_CACHE = (1 << 1)
80-
81-
FATTR_MODE = (1 << 0)
82-
FATTR_UID = (1 << 1)
83-
FATTR_GID = (1 << 2)
84-
FATTR_SIZE = (1 << 3)
85-
FATTR_ATIME = (1 << 4)
86-
FATTR_MTIME = (1 << 5)
87-
FATTR_FH = (1 << 6)
73+
FUSE_BIG_WRITES = 1 << 5
74+
FUSE_DO_READDIRPLUS = 1 << 13
75+
FUSE_READDIRPLUS_AUTO = 1 << 14
76+
FUSE_WRITEBACK_CACHE = 1 << 16
77+
FUSE_MAP_ALIGNMENT = 1 << 29
78+
79+
FOPEN_KEEP_CACHE = 1 << 1
80+
81+
FATTR_MODE = 1 << 0
82+
FATTR_UID = 1 << 1
83+
FATTR_GID = 1 << 2
84+
FATTR_SIZE = 1 << 3
85+
FATTR_ATIME = 1 << 4
86+
FATTR_MTIME = 1 << 5
87+
FATTR_FH = 1 << 6
8888

8989
CACHE_TIMEOUT = 60
9090

src/kerf/unload/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from ..utils import get_instance_id_from_name
3030

3131

32-
def _cleanup_load_resources(instance_name: str, instance_id: int, verbose: bool) -> None:
32+
def _cleanup_load_resources(instance_name: str, _instance_id: int, verbose: bool) -> None:
3333
"""Clean up resources created by kerf load --image."""
3434
import shutil
3535

0 commit comments

Comments
 (0)