diff --git a/src/add-ons/kernel/file_systems/bfs/Debug.h b/src/add-ons/kernel/file_systems/bfs/Debug.h index d3f14afc7b..3d0a523311 100644 --- a/src/add-ons/kernel/file_systems/bfs/Debug.h +++ b/src/add-ons/kernel/file_systems/bfs/Debug.h @@ -72,7 +72,8 @@ #define REPORT_ERROR(status) \ __out("bfs: %s:%d: %s\n", __FUNCTION__, __LINE__, strerror(status)); #define RETURN_ERROR(err) { status_t _status = err; if (_status < B_OK) REPORT_ERROR(_status); return _status;} - #define FATAL(x) { __out("bfs: "); __out x; sync(); panic("BFS!\n"); } +// #define FATAL(x) { __out("bfs: "); __out x; sync(); panic("BFS!\n"); } + #define FATAL(x) { __out("bfs: "); __out x; } #define INFORM(x) { __out("bfs: "); __out x; } #define FUNCTION() ; #define FUNCTION_START(x) ; diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.cpp b/src/add-ons/kernel/file_systems/bfs/Inode.cpp index fbeb46f156..ea5c1d0f93 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Inode.cpp @@ -256,7 +256,7 @@ Inode::InitCheck(bool checkNode) status_t status = Node().InitCheck(fVolume); if (status == B_BUSY) return B_BUSY; - + if (status < B_OK) { FATAL(("inode at block %Ld corrupt!\n", BlockNumber())); RETURN_ERROR(B_BAD_DATA); diff --git a/src/add-ons/kernel/file_systems/bfs/Volume.cpp b/src/add-ons/kernel/file_systems/bfs/Volume.cpp index 9352311d33..fe4ae5e5c5 100644 --- a/src/add-ons/kernel/file_systems/bfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Volume.cpp @@ -301,8 +301,10 @@ Volume::Mount(const char *deviceName, uint32 flags) if (fstat(fDevice, &stat) < 0) RETURN_ERROR(B_ERROR); +// TODO: allow turning off caching of the underlying file (once O_NOCACHE works) +#if 0 #ifndef NO_FILE_UNCACHED_IO - if (stat.st_mode & S_FILE && ioctl(fDevice, IOCTL_FILE_UNCACHED_IO, NULL) < 0) { + if ((stat.st_mode & S_FILE) != 0 && ioctl(fDevice, IOCTL_FILE_UNCACHED_IO, NULL) < 0) { // mount read-only if the cache couldn't be disabled # ifdef DEBUG FATAL(("couldn't disable cache for image file - system may dead-lock!\n")); @@ -311,6 +313,7 @@ Volume::Mount(const char *deviceName, uint32 flags) Panic(); # endif } +#endif #endif // read the super block