Function report |
Source Code:fs\super.c |
Create Date:2022-07-28 20:02:23 |
| Last Modify:2022-05-24 06:42:17 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_super - create new superblock*@type: filesystem type superblock should belong to*@flags: the mount flags*@user_ns: User namespace for the super_block* Allocates and initializes a new &struct super_block. alloc_super()
Proto:static struct super_block *alloc_super(struct file_system_type *type, int flags, struct user_namespace *user_ns)
Type:struct super_block
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file_system_type * | type | |
| int | flags | |
| struct user_namespace * | user_ns |
| 203 | s = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 207 | If Not s Then Return NULL |
| 211 | s_user_ns = get_user_ns(user_ns) |
| 212 | init_rwsem( & s_umount) |
| 213 | lockdep_set_class( & s_umount, & s_umount_key) |
| 231 | If security_sb_alloc(s) Then Go to fail |
| 234 | When i < SB_FREEZE_LEVELS cycle |
| 235 | If __percpu_init_rwsem( & rw_sem[i], sb_writers_name[i], & s_writers_key[i]) Then Go to fail |
| 240 | init_waitqueue_head( & wait_unfrozen) |
| 241 | s_bdi = noop_backing_dev_info |
| 243 | If s_user_ns != userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ? Then s_iflags |= Ignore devices on this fs |
| 245 | INIT_HLIST_NODE( & s_instances) |
| 246 | INIT_HLIST_BL_HEAD( & s_roots) |
| 247 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & s_sync_lock) |
| 253 | s_count = 1 |
| 254 | atomic_set( & s_active, 1) |
| 255 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & s_vfs_rename_mutex) |
| 256 | lockdep_set_class( & s_vfs_rename_mutex, & s_vfs_rename_key) |
| 257 | init_rwsem( & dqio_sem) |
| 258 | s_maxbytes = MAX_NON_LFS |
| 259 | s_op = default_op |
| 260 | s_time_gran = 1000000000 |
| 261 | s_time_min = TIME64_MIN |
| 268 | batch = 1024 |
| 269 | flags = Flags | SHRINKER_MEMCG_AWARE |
| 270 | If Add a shrinker callback to be called from the vm. Then Go to fail |
| 272 | If list_lru_init_memcg( & s_dentry_lru, & s_shrink) Then Go to fail |
| 274 | If list_lru_init_memcg( & s_inode_lru, & s_shrink) Then Go to fail |
| 276 | Return s |
| 278 | fail : |
| 280 | Return NULL |
| Name | Describe |
|---|---|
| sget_fc | sget_fc - Find or create a superblock*@fc: Filesystem context |
| sget | find or create a superblock |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |