Opened 16 years ago

Last modified 16 years ago

#2579 closed bug

File cache failure with read-only volumes. — at Initial Version

Reported by: bga Owned by: axeld
Priority: normal Milestone: R1
Component: File Systems/BFS Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I finally managed to get my IDE controller to work and mounted my Zeta partition under Haiku. Just to be safe, I mounted it read-only. To my surprise, I can not read any file on the volume. Here is what I get:

/Zeta 1.2/home> cat readat_test.cpp cat: readat_test.cpp: Read-only file system

Syslog shows:

KERN: file_cache: read pages failed: Read-only file system

And strace:

/Zeta 1.2/home> strace cat readat_test [ 728] _kern_image_relocated(0x681) (215 us) [ 728] --- SIGCONT (Continued) --- [ 728] _kern_create_sem(0x0, "exit stack lock") = 0x00003856 (15 us) [ 728] _kern_create_sem(0x1, "fork lock") = 0x00003857 (15 us) [ 728] _kern_get_system_info(0x7ffeecb4, 0x1fc) = 0x00000000 No error (7 us) [ 728] _kern_reserve_heap_address_range([0x18000000], 0x1, 0x48000000) = 0x00000000 No error (7 us) [ 728] _kern_create_area("heap", 0x2c29f0, 0x1, 0x32000, 0x0, 0x33) = 0x00001d6a (22 us) [ 728] _kern_acquire_sem(0x3857) = 0x00000000 No error (0 us) [ 728] _kern_release_sem(0x3857) = 0x00000000 No error (1 us) [ 728] _kern_create_sem(0x1, "env lock") = 0x00003858 (1 us) [ 728] _kern_acquire_sem(0x3857) = 0x00000000 No error (0 us) [ 728] _kern_release_sem(0x3857) = 0x00000000 No error (0 us) [ 728] _kern_create_sem(0x0, "user group") = 0x00003859 (15 us) [ 728] _kern_set_area_protection(0x1d64, 0x15) = 0x00000000 No error (14 us) [ 728] _kern_set_area_protection(0x1d66, 0x15) = 0x00000000 No error (23 us) [ 728] _kern_release_sem(0x3849) = 0x00000000 No error (0 us) [ 728] _kern_release_sem(0x3856) = 0x00000000 No error (0 us) [ 728] _kern_acquire_sem(0x3858) = 0x00000000 No error (0 us) [ 728] _kern_release_sem(0x3858) = 0x00000000 No error (0 us) [ 728] _kern_read_stat(0x1, (nil), false, 0x7ffeef3c, 0x3c) = 0x00000000 No error (1 us) [ 728] _kern_open(0xffffffff, "readat_test", 0x0, 0x0) = 0x00000003 (19 us) [ 728] _kern_read_stat(0x3, (nil), false, 0x7ffeef3c, 0x3c) = 0x00000000 No error (1 us) [ 728] _kern_read(0x3, 0xffffffffffffffff, 0x1802d000, 0x1000) = 0x80006008 (159 us) /bin/cat: [ 728] _kern_write(0x2, 0xffffffffffffffff, 0x7ffec85c, 0xa) = 0x0000000a (4 us) readat_test[ 728] _kern_write(0x2, 0xffffffffffffffff, 0x7ffec85c, 0xb) = 0x0000000b (3 us) : Read-only file system[ 728] _kern_write(0x2, 0xffffffffffffffff, 0x7ffec3fc, 0x17) = 0x00000017 (8 us)

[ 728] _kern_write(0x2, 0xffffffffffffffff, 0x2b518b, 0x1) = 0x00000001 (3 us) [ 728] _kern_close(0x3) = 0x00000000 No error (2 us) [ 728] _kern_close(0x1) = 0x00000000 No error (0 us) [ 728] _kern_close(0x2) = 0x00000000 No error (1 us) [ 728] _kern_release_sem(0x3856) = 0x00000000 No error (0 us) [ 728] _kern_exit_team(0x1) (2 us)

It seems the problem is the _kern_write() calls in a read-only volume. But why does reading a file result in a write operation?

Change History (0)

Note: See TracTickets for help on using tickets.