Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\dquot.c Create Date:2022-07-28 20:32:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dquot_load_quota_sb

Proto:int dquot_load_quota_sb(struct super_block *sb, int type, int format_id, unsigned int flags)

Type:int

Parameter:

TypeParameterName
struct super_block *sb
inttype
intformat_id
unsigned intflags
2335  fmt = find_quota_format(format_id)
2336  dqopt = sb_dqopt(sb)
2340  BUG_ON(flags & DQUOT_SUSPENDED)
2342  If WARN_ON_ONCE(rylock for reading -- returns 1 if successful, 0 if contention) Then lease a read lock
2345  If Not fmt Then Return -ESRCH
2347  If (!quota_write || !quota_read || (type == lement used for project quotas && get_projid == NULL)) Then
2349  error = -EINVAL
2350  Go to out_fmt
2353  If s_user_ns != userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ? Then
2354  error = -EINVAL
2355  Go to out_fmt
2358  If Not (flags & DQUOT_USAGE_ENABLED) Then
2359  error = -EINVAL
2360  Go to out_fmt
2362  If Does kernel know about any quota information for given sb + type? Then
2363  error = -EBUSY
2364  Go to out_fmt
2367  If Not ( Flags for diskquotas on this device & DQUOT_QUOTA_SYS_FILE) Then
2374  Write out and wait upon all dirty data associated with this* superblock. Filesystem data as well as the underlying block* device. Takes the superblock lock.
2375  Invalidate clean unused buffers and pagecache.
2378  error = -EINVAL
2379  If Not check_quota_file(sb, type) Then Go to out_fmt
2382  Operations for each type [type] = Operations of format
2383  dqi_format = fmt
2384  Id of the dqi_format - used when turning * quotas on after remount RW = format_id
2385  Initialization list head
2386  error = read_file_info(sb, type)
2387  If error < 0 Then Go to out_fmt
2389  If Flags for diskquotas on this device & DQUOT_QUOTA_SYS_FILE Then
2390  spin_lock( & dq_data_lock)
2391  DFQ_ flags [dq_data_lock] |= Quota stored in a system file
2392  spin_unlock( & dq_data_lock)
2394  spin_lock( & dq_state_lock)
2395  Flags for diskquotas on this device |= dquot_state_flag(flags, type)
2396  spin_unlock( & dq_state_lock)
2398  error = This routine is guarded by s_umount semaphore
2399  If error Then Turn quota off on a device. type == -1 ==> quotaoff for all types (umount)
2402  Return error
2403  out_fmt :
2404  put_quota_format(fmt)
2406  Return error
Caller
NameDescribe
dquot_load_quota_inodeMore powerful function for turning on quotas on given quota inode allowing* setting of individual quota flags
dquot_resumeReenable quotas on remount RW