patch-2.1.60 linux/fs/fat/buffer.c
Next file: linux/fs/fat/cache.c
Previous file: linux/fs/ext2/file.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Thu Oct 23 14:00:14 1997
- Orig file:
v2.1.59/linux/fs/fat/buffer.c
- Orig date:
Mon Apr 7 11:35:30 1997
diff -u --recursive --new-file v2.1.59/linux/fs/fat/buffer.c linux/fs/fat/buffer.c
@@ -10,22 +10,31 @@
#include <linux/fs.h>
#include <linux/msdos_fs.h>
+#if 0
+# define PRINTK(x) printk x
+#else
+# define PRINTK(x)
+#endif
+
struct buffer_head *fat_bread (
struct super_block *sb,
int block)
{
struct buffer_head *ret = NULL;
- /* Note that the blocksize is 512, 1024 or 2048, but the first read
- is always of size 1024 (or 2048). Doing readahead may be counterproductive
- or just plain wrong. */
+ PRINTK(("fat_bread: block=0x%x\n", block));
+ /*
+ * Note that the blocksize is 512, 1024 or 2048, but the first read
+ * is always of size 1024 (or 2048). Doing readahead may be
+ * counterproductive or just plain wrong.
+ */
if (sb->s_blocksize == 512) {
ret = bread (sb->s_dev,block,512);
} else {
struct buffer_head *real;
if (sb->s_blocksize == 1024){
real = bread (sb->s_dev,block>>1,1024);
- }else{
+ } else {
real = bread (sb->s_dev,block>>2,2048);
}
@@ -82,6 +91,7 @@
int block)
{
struct buffer_head *ret = NULL;
+ PRINTK(("fat_getblk: block=0x%x\n", block));
if (sb->s_blocksize == 512){
ret = getblk (sb->s_dev,block,512);
}else{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov