[PATCH] inode-diet: Eliminate i_blksize from the inode structure
Theodore Ts'o [Wed, 27 Sep 2006 08:50:49 +0000 (01:50 -0700)]
This eliminates the i_blksize field from struct inode.  Filesystems that want
to provide a per-inode st_blksize can do so by providing their own getattr
routine instead of using the generic_fillattr() function.

Note that some filesystems were providing pretty much random (and incorrect)
values for i_blksize.

[bunk@stusta.de: cleanup]
[akpm@osdl.org: generic_fillattr() fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

80 files changed:
arch/powerpc/platforms/cell/spufs/inode.c
arch/s390/hypfs/inode.c
drivers/block/loop.c
drivers/infiniband/hw/ipath/ipath_fs.c
drivers/isdn/capi/capifs.c
drivers/misc/ibmasm/ibmasmfs.c
drivers/oprofile/oprofilefs.c
drivers/usb/core/inode.c
drivers/usb/gadget/inode.c
fs/9p/vfs_inode.c
fs/adfs/inode.c
fs/afs/inode.c
fs/autofs/inode.c
fs/autofs4/inode.c
fs/befs/linuxvfs.c
fs/bfs/dir.c
fs/bfs/inode.c
fs/binfmt_misc.c
fs/cifs/cifsfs.c
fs/cifs/readdir.c
fs/coda/coda_linux.c
fs/configfs/inode.c
fs/cramfs/inode.c
fs/debugfs/inode.c
fs/devpts/inode.c
fs/eventpoll.c
fs/ext2/ialloc.c
fs/ext2/inode.c
fs/ext3/ialloc.c
fs/ext3/inode.c
fs/fat/inode.c
fs/freevxfs/vxfs_inode.c
fs/fuse/inode.c
fs/hfs/inode.c
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/inode.c
fs/hppfs/hppfs_kern.c
fs/hugetlbfs/inode.c
fs/isofs/inode.c
fs/jffs/inode-v23.c
fs/jffs2/fs.c
fs/jfs/jfs_extent.c
fs/jfs/jfs_imap.c
fs/jfs/jfs_inode.c
fs/jfs/jfs_metapage.c
fs/libfs.c
fs/minix/bitmap.c
fs/minix/inode.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/ntfs/inode.c
fs/ntfs/mft.c
fs/ocfs2/dlm/dlmfs.c
fs/ocfs2/inode.c
fs/pipe.c
fs/qnx4/inode.c
fs/ramfs/inode.c
fs/reiserfs/inode.c
fs/smbfs/inode.c
fs/smbfs/proc.c
fs/stat.c
fs/sysfs/inode.c
fs/sysv/ialloc.c
fs/sysv/inode.c
fs/udf/ialloc.c
fs/udf/inode.c
fs/ufs/ialloc.c
fs/ufs/inode.c
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_vnode.c
include/linux/fs.h
include/linux/nfsd/nfsfh.h
include/linux/smb.h
ipc/mqueue.c
kernel/cpuset.c
mm/shmem.c
net/sunrpc/rpc_pipe.c
security/inode.c
security/selinux/selinuxfs.c

index b837f12..3950ddc 100644 (file)
@@ -82,7 +82,6 @@ spufs_new_inode(struct super_block *sb, int mode)
        inode->i_mode = mode;
        inode->i_uid = current->fsuid;
        inode->i_gid = current->fsgid;
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_blocks = 0;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 out:
index 8735024..813fc21 100644 (file)
@@ -91,7 +91,6 @@ static struct inode *hypfs_make_inode(struct super_block *sb, int mode)
                ret->i_mode = mode;
                ret->i_uid = hypfs_info->uid;
                ret->i_gid = hypfs_info->gid;
-               ret->i_blksize = PAGE_CACHE_SIZE;
                ret->i_blocks = 0;
                ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
                if (mode & S_IFDIR)
index 7b3b94d..c774121 100644 (file)
@@ -662,7 +662,8 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
 
        mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
        lo->lo_backing_file = file;
-       lo->lo_blocksize = mapping->host->i_blksize;
+       lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ?
+               mapping->host->i_bdev->bd_block_size : PAGE_SIZE;
        lo->old_gfp_mask = mapping_gfp_mask(mapping);
        mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
        complete(&p->wait);
@@ -794,7 +795,9 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
                if (!(lo_flags & LO_FLAGS_USE_AOPS) && !file->f_op->write)
                        lo_flags |= LO_FLAGS_READ_ONLY;
 
-               lo_blocksize = inode->i_blksize;
+               lo_blocksize = S_ISBLK(inode->i_mode) ?
+                       inode->i_bdev->bd_block_size : PAGE_SIZE;
+
                error = 0;
        } else {
                goto out_putf;
index 055cdd0..c8a8af0 100644 (file)
@@ -61,7 +61,6 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
        inode->i_mode = mode;
        inode->i_uid = 0;
        inode->i_gid = 0;
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_blocks = 0;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        inode->i_private = data;
index 9ea6bd0..2dd1b57 100644 (file)
@@ -104,7 +104,6 @@ capifs_fill_super(struct super_block *s, void *data, int silent)
        inode->i_ino = 1;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_blocks = 0;
-       inode->i_blksize = 1024;
        inode->i_uid = inode->i_gid = 0;
        inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
        inode->i_op = &simple_dir_inode_operations;
@@ -149,7 +148,6 @@ void capifs_new_ncci(unsigned int number, dev_t device)
        if (!inode)
                return;
        inode->i_ino = number+2;
-       inode->i_blksize = 1024;
        inode->i_uid = config.setuid ? config.uid : current->fsuid;
        inode->i_gid = config.setgid ? config.gid : current->fsgid;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
index 0e909b6..b99dc50 100644 (file)
@@ -147,7 +147,6 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
        if (ret) {
                ret->i_mode = mode;
                ret->i_uid = ret->i_gid = 0;
-               ret->i_blksize = PAGE_CACHE_SIZE;
                ret->i_blocks = 0;
                ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
        }
index deb3735..5756401 100644 (file)
@@ -31,7 +31,6 @@ static struct inode * oprofilefs_get_inode(struct super_block * sb, int mode)
                inode->i_mode = mode;
                inode->i_uid = 0;
                inode->i_gid = 0;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        }
index 482f253..58b4b10 100644 (file)
@@ -249,7 +249,6 @@ static struct inode *usbfs_get_inode (struct super_block *sb, int mode, dev_t de
                inode->i_mode = mode;
                inode->i_uid = current->fsuid;
                inode->i_gid = current->fsgid;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                switch (mode & S_IFMT) {
index ffaa8c1..2a7162d 100644 (file)
@@ -1966,7 +1966,6 @@ gadgetfs_make_inode (struct super_block *sb,
                inode->i_mode = mode;
                inode->i_uid = default_uid;
                inode->i_gid = default_gid;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime
                                = CURRENT_TIME;
index eae50c9..7a7ec2d 100644 (file)
@@ -204,7 +204,6 @@ struct inode *v9fs_get_inode(struct super_block *sb, int mode)
                inode->i_mode = mode;
                inode->i_uid = current->fsuid;
                inode->i_gid = current->fsgid;
-               inode->i_blksize = sb->s_blocksize;
                inode->i_blocks = 0;
                inode->i_rdev = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
@@ -950,9 +949,8 @@ v9fs_stat2inode(struct v9fs_stat *stat, struct inode *inode,
 
        inode->i_size = stat->length;
 
-       inode->i_blksize = sb->s_blocksize;
        inode->i_blocks =
-           (inode->i_size + inode->i_blksize - 1) >> sb->s_blocksize_bits;
+           (inode->i_size + sb->s_blocksize - 1) >> sb->s_blocksize_bits;
 }
 
 /**
index 534f3ee..7e7a04b 100644 (file)
@@ -269,7 +269,6 @@ adfs_iget(struct super_block *sb, struct object_info *obj)
        inode->i_ino     = obj->file_id;
        inode->i_size    = obj->size;
        inode->i_nlink   = 2;
-       inode->i_blksize = PAGE_SIZE;
        inode->i_blocks  = (inode->i_size + sb->s_blocksize - 1) >>
                            sb->s_blocksize_bits;
 
index 4ebb30a..6f37754 100644 (file)
@@ -72,7 +72,6 @@ static int afs_inode_map_status(struct afs_vnode *vnode)
        inode->i_ctime.tv_sec   = vnode->status.mtime_server;
        inode->i_ctime.tv_nsec  = 0;
        inode->i_atime          = inode->i_mtime = inode->i_ctime;
-       inode->i_blksize        = PAGE_CACHE_SIZE;
        inode->i_blocks         = 0;
        inode->i_version        = vnode->fid.unique;
        inode->i_mapping->a_ops = &afs_fs_aops;
index d39d2ac..2c9759b 100644 (file)
@@ -216,7 +216,6 @@ static void autofs_read_inode(struct inode *inode)
        inode->i_nlink = 2;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_blocks = 0;
-       inode->i_blksize = 1024;
 
        if ( ino == AUTOFS_ROOT_INO ) {
                inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
index 11a6a9a..800ce87 100644 (file)
@@ -447,7 +447,6 @@ struct inode *autofs4_get_inode(struct super_block *sb,
                inode->i_uid = 0;
                inode->i_gid = 0;
        }
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_blocks = 0;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 
index f6676fb..57020c7 100644 (file)
@@ -365,7 +365,6 @@ befs_read_inode(struct inode *inode)
        inode->i_mtime.tv_nsec = 0;   /* lower 16 bits are not a time */        
        inode->i_ctime = inode->i_mtime;
        inode->i_atime = inode->i_mtime;
-       inode->i_blksize = befs_sb->block_size;
 
        befs_ino->i_inode_num = fsrun_to_cpu(sb, raw_inode->inode_num);
        befs_ino->i_parent = fsrun_to_cpu(sb, raw_inode->parent);
index 26fad96..dcf04cb 100644 (file)
@@ -102,7 +102,7 @@ static int bfs_create(struct inode * dir, struct dentry * dentry, int mode,
        inode->i_uid = current->fsuid;
        inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-       inode->i_blocks = inode->i_blksize = 0;
+       inode->i_blocks = 0;
        inode->i_op = &bfs_file_inops;
        inode->i_fop = &bfs_file_operations;
        inode->i_mapping->a_ops = &bfs_aops;
index 8fc2e8e..ed27ffb 100644 (file)
@@ -76,7 +76,6 @@ static void bfs_read_inode(struct inode * inode)
        inode->i_size = BFS_FILESIZE(di);
        inode->i_blocks = BFS_FILEBLOCKS(di);
         if (inode->i_size || inode->i_blocks) dprintf("Registered inode with %lld size, %ld blocks\n", inode->i_size, inode->i_blocks);
-       inode->i_blksize = PAGE_SIZE;
        inode->i_atime.tv_sec =  le32_to_cpu(di->i_atime);
        inode->i_mtime.tv_sec =  le32_to_cpu(di->i_mtime);
        inode->i_ctime.tv_sec =  le32_to_cpu(di->i_ctime);
index 6759b98..66ba137 100644 (file)
@@ -507,7 +507,6 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
                inode->i_mode = mode;
                inode->i_uid = 0;
                inode->i_gid = 0;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime =
                        current_fs_time(inode->i_sb);
index 4197a50..22bcf4d 100644 (file)
@@ -253,7 +253,6 @@ cifs_alloc_inode(struct super_block *sb)
        file data or metadata */
        cifs_inode->clientCanCacheRead = FALSE;
        cifs_inode->clientCanCacheAll = FALSE;
-       cifs_inode->vfs_inode.i_blksize = CIFS_MAX_MSGSIZE;
        cifs_inode->vfs_inode.i_blkbits = 14;  /* 2**14 = CIFS_MAX_MSGSIZE */
        cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;
        INIT_LIST_HEAD(&cifs_inode->openFileList);
index 9aeb58a..b27b345 100644 (file)
@@ -216,10 +216,9 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
 
        if (allocation_size < end_of_file)
                cFYI(1, ("May be sparse file, allocation less than file size"));
-       cFYI(1, ("File Size %ld and blocks %llu and blocksize %ld",
+       cFYI(1, ("File Size %ld and blocks %llu",
                (unsigned long)tmp_inode->i_size,
-               (unsigned long long)tmp_inode->i_blocks,
-               tmp_inode->i_blksize));
+               (unsigned long long)tmp_inode->i_blocks));
        if (S_ISREG(tmp_inode->i_mode)) {
                cFYI(1, ("File inode"));
                tmp_inode->i_op = &cifs_file_inode_ops;
index 5597080..95a5425 100644 (file)
@@ -110,8 +110,6 @@ void coda_vattr_to_iattr(struct inode *inode, struct coda_vattr *attr)
                inode->i_nlink = attr->va_nlink;
        if (attr->va_size != -1)
                inode->i_size = attr->va_size;
-       if (attr->va_blocksize != -1)
-               inode->i_blksize = attr->va_blocksize;
        if (attr->va_size != -1)
                inode->i_blocks = (attr->va_size + 511) >> 9;
        if (attr->va_atime.tv_sec != -1) 
index 5047e6a..fb18917 100644 (file)
@@ -135,7 +135,6 @@ struct inode * configfs_new_inode(mode_t mode, struct configfs_dirent * sd)
 {
        struct inode * inode = new_inode(configfs_sb);
        if (inode) {
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_mapping->a_ops = &configfs_aops;
                inode->i_mapping->backing_dev_info = &configfs_backing_dev_info;
index d09b677..ad96b69 100644 (file)
@@ -73,7 +73,6 @@ static int cramfs_iget5_set(struct inode *inode, void *opaque)
        inode->i_uid = cramfs_inode->uid;
        inode->i_size = cramfs_inode->size;
        inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1;
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_gid = cramfs_inode->gid;
        /* Struct copy intentional */
        inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;
index 717f482..269e649 100644 (file)
@@ -40,7 +40,6 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d
                inode->i_mode = mode;
                inode->i_uid = 0;
                inode->i_gid = 0;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                switch (mode & S_IFMT) {
index 5bf06a1..5f7b5a6 100644 (file)
@@ -113,7 +113,6 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
        inode->i_ino = 1;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_blocks = 0;
-       inode->i_blksize = 1024;
        inode->i_uid = inode->i_gid = 0;
        inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
        inode->i_op = &simple_dir_inode_operations;
@@ -172,7 +171,6 @@ int devpts_pty_new(struct tty_struct *tty)
                return -ENOMEM;
 
        inode->i_ino = number+2;
-       inode->i_blksize = 1024;
        inode->i_uid = config.setuid ? config.uid : current->fsuid;
        inode->i_gid = config.setgid ? config.gid : current->fsgid;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
index 3a35674..8d54433 100644 (file)
@@ -1590,7 +1590,6 @@ static struct inode *ep_eventpoll_inode(void)
        inode->i_uid = current->fsuid;
        inode->i_gid = current->fsgid;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-       inode->i_blksize = PAGE_SIZE;
        return inode;
 
 eexit_1:
index 695f69c..2cb545b 100644 (file)
@@ -574,7 +574,6 @@ got:
        inode->i_mode = mode;
 
        inode->i_ino = ino;
-       inode->i_blksize = PAGE_SIZE;   /* This is the optimal IO size (for stat), not the fs block size */
        inode->i_blocks = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
        memset(ei->i_data, 0, sizeof(ei->i_data));
index fb4d322..dd4e14c 100644 (file)
@@ -1094,7 +1094,6 @@ void ext2_read_inode (struct inode * inode)
                brelse (bh);
                goto bad_inode;
        }
-       inode->i_blksize = PAGE_SIZE;   /* This is the optimal IO size (for stat), not the fs block size */
        inode->i_blocks = le32_to_cpu(raw_inode->i_blocks);
        ei->i_flags = le32_to_cpu(raw_inode->i_flags);
        ei->i_faddr = le32_to_cpu(raw_inode->i_faddr);
index 1e4ded8..e45dbd6 100644 (file)
@@ -559,7 +559,6 @@ got:
 
        inode->i_ino = ino;
        /* This is the optimal IO size (for stat), not the fs block size */
-       inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
 
index c9fc15f..dcf4f1d 100644 (file)
@@ -2632,9 +2632,6 @@ void ext3_read_inode(struct inode * inode)
                 * recovery code: that's fine, we're about to complete
                 * the process of deleting those. */
        }
-       inode->i_blksize = PAGE_SIZE;   /* This is the optimal IO size
-                                        * (for stat), not the fs block
-                                        * size */  
        inode->i_blocks = le32_to_cpu(raw_inode->i_blocks);
        ei->i_flags = le32_to_cpu(raw_inode->i_flags);
 #ifdef EXT3_FRAGMENTS
index e1035a5..ab96ae8 100644 (file)
@@ -370,8 +370,6 @@ static int fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de)
                        inode->i_flags |= S_IMMUTABLE;
        }
        MSDOS_I(inode)->i_attrs = de->attr & ATTR_UNUSED;
-       /* this is as close to the truth as we can get ... */
-       inode->i_blksize = sbi->cluster_size;
        inode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1))
                           & ~((loff_t)sbi->cluster_size - 1)) >> 9;
        inode->i_mtime.tv_sec =
@@ -1131,7 +1129,6 @@ static int fat_read_root(struct inode *inode)
                MSDOS_I(inode)->i_start = 0;
                inode->i_size = sbi->dir_entries * sizeof(struct msdos_dir_entry);
        }
-       inode->i_blksize = sbi->cluster_size;
        inode->i_blocks = ((inode->i_size + (sbi->cluster_size - 1))
                           & ~((loff_t)sbi->cluster_size - 1)) >> 9;
        MSDOS_I(inode)->i_logstart = 0;
index 32a82ed..4786d51 100644 (file)
@@ -239,7 +239,6 @@ vxfs_iinit(struct inode *ip, struct vxfs_inode_info *vip)
        ip->i_ctime.tv_nsec = 0;
        ip->i_mtime.tv_nsec = 0;
 
-       ip->i_blksize = PAGE_SIZE;
        ip->i_blocks = vip->vii_blocks;
        ip->i_generation = vip->vii_gen;
 
index 7d25092..cb7cadb 100644 (file)
@@ -118,7 +118,6 @@ void fuse_change_attributes(struct inode *inode, struct fuse_attr *attr)
        inode->i_uid     = attr->uid;
        inode->i_gid     = attr->gid;
        i_size_write(inode, attr->size);
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_blocks  = attr->blocks;
        inode->i_atime.tv_sec   = attr->atime;
        inode->i_atime.tv_nsec  = attr->atimensec;
index 315cf44..d05641c 100644 (file)
@@ -154,7 +154,6 @@ struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, int mode)
        inode->i_gid = current->fsgid;
        inode->i_nlink = 1;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-       inode->i_blksize = HFS_SB(sb)->alloc_blksz;
        HFS_I(inode)->flags = 0;
        HFS_I(inode)->rsrc_inode = NULL;
        HFS_I(inode)->fs_blocks = 0;
@@ -284,7 +283,6 @@ static int hfs_read_inode(struct inode *inode, void *data)
        inode->i_uid = hsb->s_uid;
        inode->i_gid = hsb->s_gid;
        inode->i_nlink = 1;
-       inode->i_blksize = HFS_SB(inode->i_sb)->alloc_blksz;
 
        if (idata->key)
                HFS_I(inode)->cat_key = *idata->key;
index 924ecde..0eb1a60 100644 (file)
@@ -304,7 +304,6 @@ struct inode *hfsplus_new_inode(struct super_block *sb, int mode)
        inode->i_gid = current->fsgid;
        inode->i_nlink = 1;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-       inode->i_blksize = HFSPLUS_SB(sb).alloc_blksz;
        INIT_LIST_HEAD(&HFSPLUS_I(inode).open_dir_list);
        init_MUTEX(&HFSPLUS_I(inode).extents_lock);
        atomic_set(&HFSPLUS_I(inode).opencnt, 0);
@@ -407,7 +406,6 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd)
        type = hfs_bnode_read_u16(fd->bnode, fd->entryoffset);
 
        HFSPLUS_I(inode).dev = 0;
-       inode->i_blksize = HFSPLUS_SB(inode->i_sb).alloc_blksz;
        if (type == HFSPLUS_FOLDER) {
                struct hfsplus_cat_folder *folder = &entry.folder;
 
index b82e3d9..322e876 100644 (file)
@@ -156,7 +156,6 @@ static int read_name(struct inode *ino, char *name)
        ino->i_mode = i_mode;
        ino->i_nlink = i_nlink;
        ino->i_size = i_size;
-       ino->i_blksize = i_blksize;
        ino->i_blocks = i_blocks;
        return(0);
 }
index 56f2c33..bcf6ee3 100644 (file)
@@ -17,7 +17,6 @@ void hpfs_init_inode(struct inode *i)
        i->i_gid = hpfs_sb(sb)->sb_gid;
        i->i_mode = hpfs_sb(sb)->sb_mode;
        hpfs_inode->i_conv = hpfs_sb(sb)->sb_conv;
-       i->i_blksize = 512;
        i->i_size = -1;
        i->i_blocks = -1;
        
index 3a9bdf5..dcb6d2e 100644 (file)
@@ -152,7 +152,6 @@ static void hppfs_read_inode(struct inode *ino)
        ino->i_mode = proc_ino->i_mode;
        ino->i_nlink = proc_ino->i_nlink;
        ino->i_size = proc_ino->i_size;
-       ino->i_blksize = proc_ino->i_blksize;
        ino->i_blocks = proc_ino->i_blocks;
 }
 
index c3920c9..e025a31 100644 (file)
@@ -357,7 +357,6 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb, uid_t uid,
                inode->i_mode = mode;
                inode->i_uid = uid;
                inode->i_gid = gid;
-               inode->i_blksize = HPAGE_SIZE;
                inode->i_blocks = 0;
                inode->i_mapping->a_ops = &hugetlbfs_aops;
                inode->i_mapping->backing_dev_info =&hugetlbfs_backing_dev_info;
index 10e4789..4527692 100644 (file)
@@ -1235,7 +1235,7 @@ static void isofs_read_inode(struct inode *inode)
        }
        inode->i_uid = sbi->s_uid;
        inode->i_gid = sbi->s_gid;
-       inode->i_blocks = inode->i_blksize = 0;
+       inode->i_blocks = 0;
 
        ei->i_format_parm[0] = 0;
        ei->i_format_parm[1] = 0;
@@ -1291,7 +1291,6 @@ static void isofs_read_inode(struct inode *inode)
                              isonum_711 (de->ext_attr_length));
 
        /* Set the number of blocks for stat() - should be done before RR */
-       inode->i_blksize = PAGE_CACHE_SIZE; /* For stat() only */
        inode->i_blocks  = (inode->i_size + 511) >> 9;
 
        /*
index 7358ef8..f5cf9c9 100644 (file)
@@ -364,7 +364,6 @@ jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode,
        inode->i_ctime.tv_nsec = 0;
        inode->i_mtime.tv_nsec = 0;
        inode->i_atime.tv_nsec = 0;
-       inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = (inode->i_size + 511) >> 9;
 
        f = jffs_find_file(c, raw_inode->ino);
@@ -1706,7 +1705,6 @@ jffs_read_inode(struct inode *inode)
        inode->i_mtime.tv_nsec = 
        inode->i_ctime.tv_nsec = 0;
 
-       inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = (inode->i_size + 511) >> 9;
        if (S_ISREG(inode->i_mode)) {
                inode->i_op = &jffs_file_inode_operations;
index 4780f82..72d9909 100644 (file)
@@ -263,7 +263,6 @@ void jffs2_read_inode (struct inode *inode)
 
        inode->i_nlink = f->inocache->nlink;
 
-       inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = (inode->i_size + 511) >> 9;
 
        switch (inode->i_mode & S_IFMT) {
@@ -449,7 +448,6 @@ struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_i
        inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
        ri->atime = ri->mtime = ri->ctime = cpu_to_je32(I_SEC(inode->i_mtime));
 
-       inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = 0;
        inode->i_size = 0;
 
index 4d52593..4c74f09 100644 (file)
@@ -468,7 +468,7 @@ int extRecord(struct inode *ip, xad_t * xp)
 int extFill(struct inode *ip, xad_t * xp)
 {
        int rc, nbperpage = JFS_SBI(ip->i_sb)->nbperpage;
-       s64 blkno = offsetXAD(xp) >> ip->i_blksize;
+       s64 blkno = offsetXAD(xp) >> ip->i_blkbits;
 
 //      assert(ISSPARSE(ip));
 
index ccbe60a..369d7f3 100644 (file)
@@ -3115,7 +3115,6 @@ static int copy_from_dinode(struct dinode * dip, struct inode *ip)
        ip->i_mtime.tv_nsec = le32_to_cpu(dip->di_mtime.tv_nsec);
        ip->i_ctime.tv_sec = le32_to_cpu(dip->di_ctime.tv_sec);
        ip->i_ctime.tv_nsec = le32_to_cpu(dip->di_ctime.tv_nsec);
-       ip->i_blksize = ip->i_sb->s_blocksize;
        ip->i_blocks = LBLK2PBLK(ip->i_sb, le64_to_cpu(dip->di_nblocks));
        ip->i_generation = le32_to_cpu(dip->di_gen);
 
index 495df40..bffaca9 100644 (file)
@@ -115,7 +115,6 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
        }
        jfs_inode->mode2 |= mode;
 
-       inode->i_blksize = sb->s_blocksize;
        inode->i_blocks = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        jfs_inode->otime = inode->i_ctime.tv_sec;
index e1e0a6e..f5afc12 100644 (file)
@@ -257,7 +257,7 @@ static sector_t metapage_get_blocks(struct inode *inode, sector_t lblock,
        int rc = 0;
        int xflag;
        s64 xaddr;
-       sector_t file_blocks = (inode->i_size + inode->i_blksize - 1) >>
+       sector_t file_blocks = (inode->i_size + inode->i_sb->s_blocksize - 1) >>
                               inode->i_blkbits;
 
        if (lblock >= file_blocks)
index 2751793..8db5afb 100644 (file)
@@ -383,7 +383,6 @@ int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files
                return -ENOMEM;
        inode->i_mode = S_IFDIR | 0755;
        inode->i_uid = inode->i_gid = 0;
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_blocks = 0;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        inode->i_op = &simple_dir_inode_operations;
@@ -405,7 +404,6 @@ int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files
                        goto out;
                inode->i_mode = S_IFREG | files->mode;
                inode->i_uid = inode->i_gid = 0;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                inode->i_fop = files->ops;
index 4a6abc4..df6b107 100644 (file)
@@ -254,7 +254,7 @@ struct inode * minix_new_inode(const struct inode * dir, int * error)
        inode->i_gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
        inode->i_ino = j;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-       inode->i_blocks = inode->i_blksize = 0;
+       inode->i_blocks = 0;
        memset(&minix_i(inode)->u, 0, sizeof(minix_i(inode)->u));
        insert_inode_hash(inode);
        mark_inode_dirty(inode);
index 826b9d8..c11a4b9 100644 (file)
@@ -396,7 +396,7 @@ static void V1_minix_read_inode(struct inode * inode)
        inode->i_mtime.tv_nsec = 0;
        inode->i_atime.tv_nsec = 0;
        inode->i_ctime.tv_nsec = 0;
-       inode->i_blocks = inode->i_blksize = 0;
+       inode->i_blocks = 0;
        for (i = 0; i < 9; i++)
                minix_inode->u.i1_data[i] = raw_inode->i_zone[i];
        minix_set_inode(inode, old_decode_dev(raw_inode->i_zone[0]));
@@ -429,7 +429,7 @@ static void V2_minix_read_inode(struct inode * inode)
        inode->i_mtime.tv_nsec = 0;
        inode->i_atime.tv_nsec = 0;
        inode->i_ctime.tv_nsec = 0;
-       inode->i_blocks = inode->i_blksize = 0;
+       inode->i_blocks = 0;
        for (i = 0; i < 10; i++)
                minix_inode->u.i2_data[i] = raw_inode->i_zone[i];
        minix_set_inode(inode, old_decode_dev(raw_inode->i_zone[0]));
index 8244710..42e3bef 100644 (file)
@@ -223,7 +223,6 @@ static void ncp_set_attr(struct inode *inode, struct ncp_entry_info *nwinfo)
        inode->i_nlink = 1;
        inode->i_uid = server->m.uid;
        inode->i_gid = server->m.gid;
-       inode->i_blksize = NCP_BLOCK_SIZE;
 
        ncp_update_dates(inode, &nwinfo->i);
        ncp_update_inode(inode, nwinfo);
index 931f52a..bc9376c 100644 (file)
@@ -277,10 +277,8 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
                         * report the blocks in 512byte units
                         */
                        inode->i_blocks = nfs_calc_block_size(fattr->du.nfs3.used);
-                       inode->i_blksize = inode->i_sb->s_blocksize;
                } else {
                        inode->i_blocks = fattr->du.nfs2.blocks;
-                       inode->i_blksize = fattr->du.nfs2.blocksize;
                }
                nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
                nfsi->attrtimeo_timestamp = jiffies;
@@ -969,10 +967,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
                 * report the blocks in 512byte units
                 */
                inode->i_blocks = nfs_calc_block_size(fattr->du.nfs3.used);
-               inode->i_blksize = inode->i_sb->s_blocksize;
        } else {
                inode->i_blocks = fattr->du.nfs2.blocks;
-               inode->i_blksize = fattr->du.nfs2.blocksize;
        }
 
        if ((fattr->valid & NFS_ATTR_FATTR_V4) != 0 &&
index 3185212..933dbd8 100644 (file)
@@ -556,8 +556,6 @@ static int ntfs_read_locked_inode(struct inode *vi)
 
        /* Setup the generic vfs inode parts now. */
 
-       /* This is the optimal IO size (for stat), not the fs block size. */
-       vi->i_blksize = PAGE_CACHE_SIZE;
        /*
         * This is for checking whether an inode has changed w.r.t. a file so
         * that the file can be updated if necessary (compare with f_version).
@@ -1234,7 +1232,6 @@ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
        base_ni = NTFS_I(base_vi);
 
        /* Just mirror the values from the base inode. */
-       vi->i_blksize   = base_vi->i_blksize;
        vi->i_version   = base_vi->i_version;
        vi->i_uid       = base_vi->i_uid;
        vi->i_gid       = base_vi->i_gid;
@@ -1504,7 +1501,6 @@ static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi)
        ni      = NTFS_I(vi);
        base_ni = NTFS_I(base_vi);
        /* Just mirror the values from the base inode. */
-       vi->i_blksize   = base_vi->i_blksize;
        vi->i_version   = base_vi->i_version;
        vi->i_uid       = base_vi->i_uid;
        vi->i_gid       = base_vi->i_gid;
index 578fb3d..584260f 100644 (file)
@@ -2638,11 +2638,6 @@ mft_rec_already_initialized:
                }
                vi->i_ino = bit;
                /*
-                * This is the optimal IO size (for stat), not the fs block
-                * size.
-                */
-               vi->i_blksize = PAGE_CACHE_SIZE;
-               /*
                 * This is for checking whether an inode has changed w.r.t. a
                 * file so that the file can be updated if necessary (compare
                 * with f_version).
index 0ff0898..0368c64 100644 (file)
@@ -335,7 +335,6 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)
                inode->i_mode = mode;
                inode->i_uid = current->fsuid;
                inode->i_gid = current->fsgid;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
@@ -362,7 +361,6 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
        inode->i_mode = mode;
        inode->i_uid = current->fsuid;
        inode->i_gid = current->fsgid;
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_blocks = 0;
        inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
index 69d3db5..16e8e74 100644 (file)
@@ -269,7 +269,6 @@ int ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
        inode->i_mode = le16_to_cpu(fe->i_mode);
        inode->i_uid = le32_to_cpu(fe->i_uid);
        inode->i_gid = le32_to_cpu(fe->i_gid);
-       inode->i_blksize = (u32)osb->s_clustersize;
 
        /* Fast symlinks will have i_size but no allocated clusters. */
        if (S_ISLNK(inode->i_mode) && !fe->i_clusters)
@@ -1258,8 +1257,6 @@ leave:
 void ocfs2_refresh_inode(struct inode *inode,
                         struct ocfs2_dinode *fe)
 {
-       struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
-
        spin_lock(&OCFS2_I(inode)->ip_lock);
 
        OCFS2_I(inode)->ip_clusters = le32_to_cpu(fe->i_clusters);
@@ -1270,7 +1267,6 @@ void ocfs2_refresh_inode(struct inode *inode,
        inode->i_uid = le32_to_cpu(fe->i_uid);
        inode->i_gid = le32_to_cpu(fe->i_gid);
        inode->i_mode = le16_to_cpu(fe->i_mode);
-       inode->i_blksize = (u32) osb->s_clustersize;
        if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0)
                inode->i_blocks = 0;
        else
index 2035257..f3b6f71 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -879,7 +879,6 @@ static struct inode * get_pipe_inode(void)
        inode->i_uid = current->fsuid;
        inode->i_gid = current->fsgid;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-       inode->i_blksize = PAGE_SIZE;
 
        return inode;
 
index fddbd61..5a41db2 100644 (file)
@@ -496,7 +496,6 @@ static void qnx4_read_inode(struct inode *inode)
        inode->i_ctime.tv_sec   = le32_to_cpu(raw_inode->di_ctime);
        inode->i_ctime.tv_nsec = 0;
        inode->i_blocks  = le32_to_cpu(raw_inode->di_first_xtnt.xtnt_size);
-       inode->i_blksize = QNX4_DIR_ENTRY_SIZE;
 
        memcpy(qnx4_inode, raw_inode, QNX4_DIR_ENTRY_SIZE);
        if (S_ISREG(inode->i_mode)) {
index b967733..bc0e516 100644 (file)
@@ -58,7 +58,6 @@ struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev)
                inode->i_mode = mode;
                inode->i_uid = current->fsuid;
                inode->i_gid = current->fsgid;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_mapping->a_ops = &ramfs_aops;
                inode->i_mapping->backing_dev_info = &ramfs_backing_dev_info;
index 52f1e21..8810fda 100644 (file)
@@ -17,8 +17,6 @@
 #include <linux/writeback.h>
 #include <linux/quotaops.h>
 
-extern int reiserfs_default_io_size;   /* default io size devuned in super.c */
-
 static int reiserfs_commit_write(struct file *f, struct page *page,
                                 unsigned from, unsigned to);
 static int reiserfs_prepare_write(struct file *f, struct page *page,
@@ -1122,7 +1120,6 @@ static void init_inode(struct inode *inode, struct path *path)
        ih = PATH_PITEM_HEAD(path);
 
        copy_key(INODE_PKEY(inode), &(ih->ih_key));
-       inode->i_blksize = reiserfs_default_io_size;
 
        INIT_LIST_HEAD(&(REISERFS_I(inode)->i_prealloc_list));
        REISERFS_I(inode)->i_flags = 0;
@@ -1877,7 +1874,6 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
        }
        // these do not go to on-disk stat data
        inode->i_ino = le32_to_cpu(ih.ih_key.k_objectid);
-       inode->i_blksize = reiserfs_default_io_size;
 
        // store in in-core inode the key of stat data and version all
        // object items will have (directory items will have old offset
index 92cf60a..2c122ee 100644 (file)
@@ -166,7 +166,6 @@ smb_get_inode_attr(struct inode *inode, struct smb_fattr *fattr)
        fattr->f_mtime  = inode->i_mtime;
        fattr->f_ctime  = inode->i_ctime;
        fattr->f_atime  = inode->i_atime;
-       fattr->f_blksize= inode->i_blksize;
        fattr->f_blocks = inode->i_blocks;
 
        fattr->attr     = SMB_I(inode)->attr;
@@ -200,7 +199,6 @@ smb_set_inode_attr(struct inode *inode, struct smb_fattr *fattr)
        inode->i_uid    = fattr->f_uid;
        inode->i_gid    = fattr->f_gid;
        inode->i_ctime  = fattr->f_ctime;
-       inode->i_blksize= fattr->f_blksize;
        inode->i_blocks = fattr->f_blocks;
        inode->i_size   = fattr->f_size;
        inode->i_mtime  = fattr->f_mtime;
index c349505..40e174d 100644 (file)
@@ -1826,7 +1826,6 @@ smb_init_dirent(struct smb_sb_info *server, struct smb_fattr *fattr)
        fattr->f_nlink = 1;
        fattr->f_uid = server->mnt->uid;
        fattr->f_gid = server->mnt->gid;
-       fattr->f_blksize = SMB_ST_BLKSIZE;
        fattr->f_unix = 0;
 }
 
index 3a44dcf..60a31d5 100644 (file)
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -14,6 +14,7 @@
 #include <linux/namei.h>
 #include <linux/security.h>
 #include <linux/syscalls.h>
+#include <linux/pagemap.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -32,7 +33,7 @@ void generic_fillattr(struct inode *inode, struct kstat *stat)
        stat->ctime = inode->i_ctime;
        stat->size = i_size_read(inode);
        stat->blocks = inode->i_blocks;
-       stat->blksize = inode->i_blksize;
+       stat->blksize = (1 << inode->i_blkbits);
 }
 
 EXPORT_SYMBOL(generic_fillattr);
index fd7cd5f..e79e38d 100644 (file)
@@ -125,7 +125,6 @@ struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent * sd)
 {
        struct inode * inode = new_inode(sysfs_sb);
        if (inode) {
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_mapping->a_ops = &sysfs_aops;
                inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info;
index 9b585d1..115ab0d 100644 (file)
@@ -170,7 +170,7 @@ struct inode * sysv_new_inode(const struct inode * dir, mode_t mode)
        inode->i_uid = current->fsuid;
        inode->i_ino = fs16_to_cpu(sbi, ino);
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-       inode->i_blocks = inode->i_blksize = 0;
+       inode->i_blocks = 0;
        memset(SYSV_I(inode)->i_data, 0, sizeof(SYSV_I(inode)->i_data));
        SYSV_I(inode)->i_dir_start_lookup = 0;
        insert_inode_hash(inode);
index 58b2d22..d63c5e4 100644 (file)
@@ -201,7 +201,7 @@ static void sysv_read_inode(struct inode *inode)
        inode->i_ctime.tv_nsec = 0;
        inode->i_atime.tv_nsec = 0;
        inode->i_mtime.tv_nsec = 0;
-       inode->i_blocks = inode->i_blksize = 0;
+       inode->i_blocks = 0;
 
        si = SYSV_I(inode);
        for (block = 0; block < 10+1+1+1; block++)
index d1d3823..8206983 100644 (file)
@@ -121,7 +121,6 @@ struct inode * udf_new_inode (struct inode *dir, int mode, int * err)
        UDF_I_LOCATION(inode).logicalBlockNum = block;
        UDF_I_LOCATION(inode).partitionReferenceNum = UDF_I_LOCATION(dir).partitionReferenceNum;
        inode->i_ino = udf_get_lb_pblock(sb, UDF_I_LOCATION(inode), 0);
-       inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = 0;
        UDF_I_LENEATTR(inode) = 0;
        UDF_I_LENALLOC(inode) = 0;
index 605f511..b223b32 100644 (file)
@@ -916,8 +916,6 @@ __udf_read_inode(struct inode *inode)
         *      i_nlink = 1
         *      i_op = NULL;
         */
-       inode->i_blksize = PAGE_SIZE;
-
        bh = udf_read_ptagged(inode->i_sb, UDF_I_LOCATION(inode), 0, &ident);
 
        if (!bh)
index 9501dcd..2ad1259 100644 (file)
@@ -255,7 +255,6 @@ cg_found:
                inode->i_gid = current->fsgid;
 
        inode->i_ino = cg * uspi->s_ipg + bit;
-       inode->i_blksize = PAGE_SIZE;   /* This is the optimal IO size (for stat), not the fs block size */
        inode->i_blocks = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
        ufsi->i_flags = UFS_I(dir)->i_flags;
index 30c6e8a..ee1eaa6 100644 (file)
@@ -741,7 +741,6 @@ void ufs_read_inode(struct inode * inode)
                ufs1_read_inode(inode, ufs_inode + ufs_inotofsbo(inode->i_ino));
        }
 
-       inode->i_blksize = PAGE_SIZE;/*This is the optimal IO size (for stat)*/
        inode->i_version++;
        ufsi->i_lastfrag =
                (inode->i_size + uspi->s_fsize - 1) >> uspi->s_fshift;
index 4754f34..9df9ed3 100644 (file)
@@ -171,7 +171,6 @@ xfs_revalidate_inode(
                break;
        }
 
-       inode->i_blksize = xfs_preferred_iosize(mp);
        inode->i_generation = ip->i_d.di_gen;
        i_size_write(inode, ip->i_d.di_size);
        inode->i_blocks =
index 6628d96..553fa73 100644 (file)
@@ -122,7 +122,6 @@ vn_revalidate_core(
        inode->i_blocks     = vap->va_nblocks;
        inode->i_mtime      = vap->va_mtime;
        inode->i_ctime      = vap->va_ctime;
-       inode->i_blksize    = vap->va_blocksize;
        if (vap->va_xflags & XFS_XFLAG_IMMUTABLE)
                inode->i_flags |= S_IMMUTABLE;
        else
index 192e69b..8f74dfb 100644 (file)
@@ -512,7 +512,6 @@ struct inode {
        struct timespec         i_mtime;
        struct timespec         i_ctime;
        unsigned int            i_blkbits;
-       unsigned long           i_blksize;
        unsigned long           i_version;
        blkcnt_t                i_blocks;
        unsigned short          i_bytes;
index f9edcd2..31a3cb6 100644 (file)
@@ -269,14 +269,8 @@ fill_post_wcc(struct svc_fh *fhp)
        fhp->fh_post_uid        = inode->i_uid;
        fhp->fh_post_gid        = inode->i_gid;
        fhp->fh_post_size       = inode->i_size;
-       if (inode->i_blksize) {
-               fhp->fh_post_blksize    = inode->i_blksize;
-               fhp->fh_post_blocks     = inode->i_blocks;
-       } else {
-               fhp->fh_post_blksize    = BLOCK_SIZE;
-               /* how much do we care for accuracy with MinixFS? */
-               fhp->fh_post_blocks     = (inode->i_size+511) >> 9;
-       }
+       fhp->fh_post_blksize    = BLOCK_SIZE;
+       fhp->fh_post_blocks     = inode->i_blocks;
        fhp->fh_post_rdev[0]    = htonl((u32)imajor(inode));
        fhp->fh_post_rdev[1]    = htonl((u32)iminor(inode));
        fhp->fh_post_atime      = inode->i_atime;
index 6df3b15..f098dff 100644 (file)
@@ -89,7 +89,6 @@ struct smb_fattr {
        struct timespec f_atime;
        struct timespec f_mtime;
        struct timespec f_ctime;
-       unsigned long   f_blksize;
        unsigned long   f_blocks;
        int             f_unix;
 };
index f8381f0..840f8a6 100644 (file)
@@ -115,7 +115,6 @@ static struct inode *mqueue_get_inode(struct super_block *sb, int mode,
                inode->i_mode = mode;
                inode->i_uid = current->fsuid;
                inode->i_gid = current->fsgid;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_mtime = inode->i_ctime = inode->i_atime =
                                CURRENT_TIME;
index cff4151..1b32c2c 100644 (file)
@@ -289,7 +289,6 @@ static struct inode *cpuset_new_inode(mode_t mode)
                inode->i_mode = mode;
                inode->i_uid = current->fsuid;
                inode->i_gid = current->fsgid;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                inode->i_mapping->backing_dev_info = &cpuset_backing_dev_info;
index 0a8e29c..eda907c 100644 (file)
@@ -1351,7 +1351,6 @@ shmem_get_inode(struct super_block *sb, int mode, dev_t dev)
                inode->i_mode = mode;
                inode->i_uid = current->fsuid;
                inode->i_gid = current->fsgid;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_mapping->a_ops = &shmem_aops;
                inode->i_mapping->backing_dev_info = &shmem_backing_dev_info;
index f65bea7..700c6e0 100644 (file)
@@ -488,7 +488,6 @@ rpc_get_inode(struct super_block *sb, int mode)
                return NULL;
        inode->i_mode = mode;
        inode->i_uid = inode->i_gid = 0;
-       inode->i_blksize = PAGE_CACHE_SIZE;
        inode->i_blocks = 0;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        switch(mode & S_IFMT) {
index 176aace..49ee515 100644 (file)
@@ -64,7 +64,6 @@ static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)
                inode->i_mode = mode;
                inode->i_uid = 0;
                inode->i_gid = 0;
-               inode->i_blksize = PAGE_CACHE_SIZE;
                inode->i_blocks = 0;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
                switch (mode & S_IFMT) {
index 00534c3..bab7b38 100644 (file)
@@ -771,7 +771,6 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode)
        if (ret) {
                ret->i_mode = mode;
                ret->i_uid = ret->i_gid = 0;
-               ret->i_blksize = PAGE_CACHE_SIZE;
                ret->i_blocks = 0;
                ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
        }