• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7800-V1.0.2.28/target/linux/generic/files/fs/yaffs2/

Lines Matching defs:sb

27  * >> 2.4: sb->u.generic_sbp points to the yaffs_dev_t associated with
29 * >> 2.6: sb->s_fs_info points to the yaffs_dev_t associated with this
107 /* FIXME: use sb->s_id instead ? */
108 #define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf)
114 #define yaffs_devname(sb, buf) kdevname(sb->s_dev)
195 #define Y_IGET(sb, inum) iget((sb), (inum))
201 #define Y_IGET(sb, inum) yaffs_iget((sb), (inum))
203 static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino);
216 #define yaffs_SuperToDevice(sb) ((yaffs_dev_t *)sb->s_fs_info)
218 #define yaffs_SuperToDevice(sb) ((yaffs_dev_t *)sb->u.generic_sbp)
226 static void yaffs_put_super(struct super_block *sb);
276 static int yaffs_sync_fs(struct super_block *sb, int wait);
277 static void yaffs_write_super(struct super_block *sb);
279 static int yaffs_sync_fs(struct super_block *sb);
280 static int yaffs_write_super(struct super_block *sb);
286 static int yaffs_statfs(struct super_block *sb, struct kstatfs *buf);
288 static int yaffs_statfs(struct super_block *sb, struct statfs *buf);
531 yaffs2_nfs_get_inode(struct super_block *sb, uint64_t ino, uint32_t generation)
533 return Y_IGET(sb, ino);
537 yaffs2_fh_to_dentry(struct super_block *sb, struct fid *fid, int fh_len, int fh_type)
539 return generic_fh_to_dentry(sb, fid, fh_len, fh_type, yaffs2_nfs_get_inode) ;
543 yaffs2_fh_to_parent(struct super_block *sb, struct fid *fid, int fh_len, int fh_type)
545 return generic_fh_to_parent(sb, fid, fh_len, fh_type, yaffs2_nfs_get_inode);
551 struct super_block *sb = dentry->d_inode->i_sb;
564 inode = Y_IGET(sb, parent_ino);
770 struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,
1406 struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,
1411 if (!sb) {
1428 inode = Y_IGET(sb, obj->obj_id);
2145 struct super_block *sb = dentry->d_sb;
2147 static int yaffs_statfs(struct super_block *sb, struct kstatfs *buf)
2149 yaffs_dev_t *dev = yaffs_SuperToDevice(sb);
2151 static int yaffs_statfs(struct super_block *sb, struct statfs *buf)
2153 yaffs_dev_t *dev = yaffs_SuperToDevice(sb);
2161 buf->f_bsize = sb->s_blocksize;
2173 do_div(bytesInDev, sb->s_blocksize); /* bytesInDev becomes the number of blocks */
2179 do_div(bytesFree, sb->s_blocksize);
2183 } else if (sb->s_blocksize > dev->data_bytes_per_chunk) {
2188 (sb->s_blocksize / dev->data_bytes_per_chunk);
2191 (sb->s_blocksize / dev->data_bytes_per_chunk);
2196 (dev->data_bytes_per_chunk / sb->s_blocksize);
2200 (dev->data_bytes_per_chunk / sb->s_blocksize);
2213 static void yaffs_flush_inodes(struct super_block *sb)
2218 list_for_each_entry(iptr,&sb->s_inodes, i_sb_list){
2229 static void yaffs_flush_super(struct super_block *sb, int do_checkpoint)
2231 yaffs_dev_t *dev = yaffs_SuperToDevice(sb);
2235 yaffs_flush_inodes(sb);
2264 static int yaffs_do_sync_fs(struct super_block *sb,
2268 yaffs_dev_t *dev = yaffs_SuperToDevice(sb);
2276 sb->s_dirt ? "dirty" : "clean",
2285 if (sb->s_dirt || do_checkpoint) {
2286 yaffs_flush_super(sb, !dev->is_checkpointed && do_checkpoint);
2287 sb->s_dirt = 0;
2446 static void yaffs_write_super(struct super_block *sb)
2448 static int yaffs_write_super(struct super_block *sb)
2457 yaffs_do_sync_fs(sb, request_checkpoint);
2466 static int yaffs_sync_fs(struct super_block *sb, int wait)
2468 static int yaffs_sync_fs(struct super_block *sb)
2477 yaffs_do_sync_fs(sb, request_checkpoint);
2484 static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino)
2488 yaffs_dev_t *dev = yaffs_SuperToDevice(sb);
2493 inode = iget_locked(sb, ino);
2547 static void yaffs_put_super(struct super_block *sb)
2549 yaffs_dev_t *dev = yaffs_SuperToDevice(sb);
2561 yaffs_flush_super(sb,1);
2564 yaffs_dev_to_lc(dev)->putSuperFunc(sb);
2584 static void yaffs_MTDPutSuper(struct super_block *sb)
2586 struct mtd_info *mtd = yaffs_dev_to_mtd(yaffs_SuperToDevice(sb));
2597 struct super_block *sb = yaffs_dev_to_lc(dev)->superBlock;
2599 T(YAFFS_TRACE_OS, (TSTR("yaffs_touch_super() sb = %p\n"), sb));
2600 if (sb)
2601 sb->s_dirt = 1;
2681 struct super_block *sb,
2704 sb->s_magic = YAFFS_MAGIC;
2705 sb->s_op = &yaffs_super_ops;
2706 sb->s_flags |= MS_NOATIME;
2708 read_only =((sb->s_flags & MS_RDONLY) != 0);
2712 sb->s_export_op = &yaffs_export_ops;
2715 if (!sb)
2716 printk(KERN_INFO "yaffs: sb is NULL\n");
2717 else if (!sb->s_dev)
2718 printk(KERN_INFO "yaffs: sb->s_dev is NULL\n");
2719 else if (!yaffs_devname(sb, devname_buf))
2723 sb->s_dev,
2724 yaffs_devname(sb, devname_buf),
2740 sb->s_blocksize = PAGE_CACHE_SIZE;
2741 sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
2747 (int)(sb->s_blocksize)));
2751 MAJOR(sb->s_dev), MINOR(sb->s_dev),
2752 yaffs_devname(sb, devname_buf)));
2755 if (MAJOR(sb->s_dev) != MTD_BLOCK_MAJOR)
2759 mtd = get_mtd_device(NULL, MINOR(sb->s_dev));
2763 MINOR(sb->s_dev)));
2868 sb->s_flags |= MS_RDONLY;
2897 context->superBlock = sb;
2902 sb->s_fs_info = dev;
2904 sb->u.generic_sbp = dev;
3005 yaffs_dev_to_lc(dev)->superBlock= sb;
3061 inode = yaffs_get_inode(sb, S_IFDIR | 0755, 0,
3080 sb->s_root = root;
3081 sb->s_dirt = !dev->is_checkpointed;
3087 return sb;
3092 static int yaffs_internal_read_super_mtd(struct super_block *sb, void *data,
3095 return yaffs_internal_read_super(1, sb, data, silent) ? 0 : -EINVAL;
3126 static struct super_block *yaffs_read_super(struct super_block *sb, void *data,
3129 return yaffs_internal_read_super(1, sb, data, silent);
3140 static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
3143 return yaffs_internal_read_super(2, sb, data, silent) ? 0 : -EINVAL;
3173 static struct super_block *yaffs2_read_super(struct super_block *sb,
3176 return yaffs_internal_read_super(2, sb, data, silent);