วันเสาร์, มกราคม 16, 2553

FUSE Function not implemented

ช่วงที่เขียนไฟล์ซิสเต็มด้วย FUSE ก็เจอปัญหา คือ พอจะสร้างส่วนสำหรับเขียนไฟล์ (ทดสอบด้วยคำสั่ง touch) แต่ดันเจอ

$ touch fuse/11111
touch: cannot touch `fuse/11111': Function not implemented

จาก debug log

unique: 5, opcode: OPEN (14), nodeid: 2, insize: 48
unique: 5, error: 0 (Success), outsize: 32
OPEN[0] flags: 0x8801 /11111
unique: 6, opcode: SETATTR (4), nodeid: 2, insize: 128
unique: 6, error: -38 (Function not implemented), outsize: 16
unique: 7, opcode: SETATTR (4), nodeid: 2, insize: 128
unique: 7, error: -38 (Function not implemented), outsize: 16
unique: 8, opcode: SETATTR (4), nodeid: 2, insize: 128
unique: 8, error: -38 (Function not implemented), outsize: 16
unique: 9, opcode: FLUSH (25), nodeid: 2, insize: 64
FLUSH[0]
unique: 9, error: -38 (Function not implemented), outsize: 16
unique: 10, opcode: RELEASE (18), nodeid: 2, insize: 64
RELEASE[0] flags: 0x8801
unique: 10, error: 0 (Success), outsize: 16

ไปไล่ดูเอกสารทั้งของ FUSE และโมดูล perl FUSE มันก็ไม่มี setattr ให้ implement นี่ ไปเจอใน paper ชื่อ "ReFUSE: Userspace FUSE Reimplementation Using puffs" บอกว่าจริงๆ แล้วเมื่อมันเรียก system call setattr มันจะไปเรียก chmod, chown, และ utime ให้เอง ดังนั้นเลยรู้ว่าถ้าเราไม่ได้ implement 3 ตัวนั้นมันก็จะเจอ error message แบบนั้นแหละ สรุปข้อความมันทำให้เข้าใจผิดไปเยอะเลย

ไม่มีความคิดเห็น: