Lines Matching refs:sb

1122  * sb->s_flags.  Note that these mirror the equivalent MS_* flags where
1141 /* These sb flags are internal to the kernel */
1154 #define sb_has_strict_encoding(sb) \
1155 (sb->s_encoding_flags & SB_ENC_STRICT_MODE_FL)
1167 /* sb->s_iflags */
1173 /* sb->s_iflags to limit user namespace mounts */
1180 #define SB_I_PERSB_BDI 0x00000200 /* has a per-sb bdi */
1198 unsigned short frozen; /* Is sb frozen? */
1299 struct shrinker *s_shrink; /* per-sb shrinker handle */
1305 * Number of inode/mount/sb objects that are being watched, note that
1313 /* per-sb errseq_t for reporting writeback errors via syncfs */
1516 * @sb: the superblock we want a mapping in
1520 * s_user_ns of the superblock @sb. If the caller is on an idmapped mount map
1525 static inline bool fsuidgid_has_mapping(struct super_block *sb,
1528 struct user_namespace *fs_userns = sb->s_user_ns;
1654 static inline void __sb_end_write(struct super_block *sb, int level)
1656 percpu_up_read(sb->s_writers.rw_sem + level-1);
1659 static inline void __sb_start_write(struct super_block *sb, int level)
1661 percpu_down_read(sb->s_writers.rw_sem + level - 1);
1664 static inline bool __sb_start_write_trylock(struct super_block *sb, int level)
1666 return percpu_down_read_trylock(sb->s_writers.rw_sem + level - 1);
1669 #define __sb_writers_acquired(sb, lev) \
1670 percpu_rwsem_acquire(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
1671 #define __sb_writers_release(sb, lev) \
1672 percpu_rwsem_release(&(sb)->s_writers.rw_sem[(lev)-1], 1, _THIS_IP_)
1675 * __sb_write_started - check if sb freeze level is held
1676 * @sb: the super we write to
1679 * * > 0 - sb freeze level is held
1680 * * 0 - sb freeze level is not held
1683 static inline int __sb_write_started(const struct super_block *sb, int level)
1685 return lockdep_is_held_type(sb->s_writers.rw_sem + level - 1, 1);
1690 * @sb: the super we write to
1694 static inline bool sb_write_started(const struct super_block *sb)
1696 return __sb_write_started(sb, SB_FREEZE_WRITE);
1701 * @sb: the super we write to
1705 static inline bool sb_write_not_started(const struct super_block *sb)
1707 return __sb_write_started(sb, SB_FREEZE_WRITE) <= 0;
1742 * @sb: the super we wrote to
1747 static inline void sb_end_write(struct super_block *sb)
1749 __sb_end_write(sb, SB_FREEZE_WRITE);
1754 * @sb: the super we wrote to
1759 static inline void sb_end_pagefault(struct super_block *sb)
1761 __sb_end_write(sb, SB_FREEZE_PAGEFAULT);
1766 * @sb: the super we wrote to
1771 static inline void sb_end_intwrite(struct super_block *sb)
1773 __sb_end_write(sb, SB_FREEZE_FS);
1778 * @sb: the super we write to
1795 static inline void sb_start_write(struct super_block *sb)
1797 __sb_start_write(sb, SB_FREEZE_WRITE);
1800 static inline bool sb_start_write_trylock(struct super_block *sb)
1802 return __sb_start_write_trylock(sb, SB_FREEZE_WRITE);
1807 * @sb: the super we write to
1824 static inline void sb_start_pagefault(struct super_block *sb)
1826 __sb_start_write(sb, SB_FREEZE_PAGEFAULT);
1831 * @sb: the super we write to
1842 static inline void sb_start_intwrite(struct super_block *sb)
1844 __sb_start_write(sb, SB_FREEZE_FS);
1847 static inline bool sb_start_intwrite_trylock(struct super_block *sb)
1849 return __sb_start_write_trylock(sb, SB_FREEZE_FS);
2169 struct inode *(*alloc_inode)(struct super_block *sb);
2178 int (*sync_fs)(struct super_block *sb, int wait);
2200 void (*shutdown)(struct super_block *sb);
2244 static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags & SB_RDONLY; }
2525 void retire_super(struct super_block *sb);
2526 void generic_shutdown_super(struct super_block *sb);
2527 void kill_block_super(struct super_block *sb);
2528 void kill_anon_super(struct super_block *sb);
2529 void kill_litter_super(struct super_block *sb);
2530 void deactivate_super(struct super_block *sb);
2531 void deactivate_locked_super(struct super_block *sb);
2570 int super_setup_bdi_name(struct super_block *sb, char *fmt, ...);
2571 extern int super_setup_bdi(struct super_block *sb);
2573 static inline void super_set_uuid(struct super_block *sb, const u8 *uuid, unsigned len)
2575 if (WARN_ON(len > sizeof(sb->s_uuid)))
2576 len = sizeof(sb->s_uuid);
2577 sb->s_uuid_len = len;
2578 memcpy(&sb->s_uuid, uuid, len);
2581 /* set sb sysfs name based on sb->s_bdev */
2582 static inline void super_set_sysfs_name_bdev(struct super_block *sb)
2584 snprintf(sb->s_sysfs_name, sizeof(sb->s_sysfs_name), "%pg", sb->s_bdev);
2587 /* set sb sysfs name based on sb->s_uuid */
2588 static inline void super_set_sysfs_name_uuid(struct super_block *sb)
2590 WARN_ON(sb->s_uuid_len != sizeof(sb->s_uuid));
2591 snprintf(sb->s_sysfs_name, sizeof(sb->s_sysfs_name), "%pU", sb->s_uuid.b);
2594 /* set sb sysfs name based on sb->s_id */
2595 static inline void super_set_sysfs_name_id(struct super_block *sb)
2597 strscpy(sb->s_sysfs_name, sb->s_id, sizeof(sb->s_sysfs_name));
2602 static inline void super_set_sysfs_name_generic(struct super_block *sb, const char *fmt, ...)
2607 vsnprintf(sb->s_sysfs_name, sizeof(sb->s_sysfs_name), fmt, args);
2734 static inline bool sb_is_blkdev_sb(struct super_block *sb)
2736 return IS_ENABLED(CONFIG_BLOCK) && sb == blockdev_superblock;
3038 extern struct inode *ilookup5_nowait(struct super_block *sb,
3041 extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
3043 extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
3069 extern void evict_inodes(struct super_block *sb);
3091 extern struct inode *new_inode_pseudo(struct super_block *sb);
3092 extern struct inode *new_inode(struct super_block *sb);
3105 alloc_inode_sb(struct super_block *sb, struct kmem_cache *cache, gfp_t gfp)
3107 return kmem_cache_alloc_lru(cache, &sb->s_inode_lru, gfp);
3292 extern void drop_super(struct super_block *sb);
3293 extern void drop_super_exclusive(struct super_block *sb);
3374 extern void generic_set_sb_d_ops(struct super_block *sb);
3376 static inline bool sb_has_encoding(const struct super_block *sb)
3379 return !!sb->s_encoding;