亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? xfs_qm_bhv.c

?? 優龍2410linux2.6.8內核源代碼
?? C
字號:
/* * Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * Further, this software is distributed without any warranty that it is * free of the rightful claim of any third person regarding infringement * or the like.	 Any license provided herein, whether implied or * otherwise, applies only to this software file.  Patent licenses, if * any, provided herein do not apply to combinations of this program with * other software, or any other product whatsoever. * * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston MA 02111-1307, USA. * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA  94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */#include "xfs.h"#include "xfs_fs.h"#include "xfs_inum.h"#include "xfs_log.h"#include "xfs_clnt.h"#include "xfs_trans.h"#include "xfs_sb.h"#include "xfs_dir.h"#include "xfs_dir2.h"#include "xfs_alloc.h"#include "xfs_dmapi.h"#include "xfs_quota.h"#include "xfs_mount.h"#include "xfs_alloc_btree.h"#include "xfs_bmap_btree.h"#include "xfs_ialloc_btree.h"#include "xfs_btree.h"#include "xfs_ialloc.h"#include "xfs_attr_sf.h"#include "xfs_dir_sf.h"#include "xfs_dir2_sf.h"#include "xfs_dinode.h"#include "xfs_inode.h"#include "xfs_bmap.h"#include "xfs_bit.h"#include "xfs_rtalloc.h"#include "xfs_error.h"#include "xfs_itable.h"#include "xfs_rw.h"#include "xfs_acl.h"#include "xfs_cap.h"#include "xfs_mac.h"#include "xfs_attr.h"#include "xfs_buf_item.h"#include "xfs_qm.h"#define MNTOPT_QUOTA	"quota"		/* disk quotas (user) */#define MNTOPT_NOQUOTA	"noquota"	/* no quotas */#define MNTOPT_USRQUOTA	"usrquota"	/* user quota enabled */#define MNTOPT_GRPQUOTA	"grpquota"	/* group quota enabled */#define MNTOPT_UQUOTA	"uquota"	/* user quota (IRIX variant) */#define MNTOPT_GQUOTA	"gquota"	/* group quota (IRIX variant) */#define MNTOPT_UQUOTANOENF "uqnoenforce"/* user quota limit enforcement */#define MNTOPT_GQUOTANOENF "gqnoenforce"/* group quota limit enforcement */#define MNTOPT_QUOTANOENF  "qnoenforce"	/* same as uqnoenforce */STATIC intxfs_qm_parseargs(	struct bhv_desc		*bhv,	char			*options,	struct xfs_mount_args	*args,	int			update){	size_t			length;	char			*local_options = options;	char			*this_char;	int			error;	int			referenced = update;	while ((this_char = strsep(&local_options, ",")) != NULL) {		length = strlen(this_char);		if (local_options)			length++;		if (!strcmp(this_char, MNTOPT_NOQUOTA)) {			args->flags &= ~(XFSMNT_UQUOTAENF|XFSMNT_UQUOTA);			args->flags &= ~(XFSMNT_GQUOTAENF|XFSMNT_GQUOTA);			referenced = update;		} else if (!strcmp(this_char, MNTOPT_QUOTA) ||			   !strcmp(this_char, MNTOPT_UQUOTA) ||			   !strcmp(this_char, MNTOPT_USRQUOTA)) {			args->flags |= XFSMNT_UQUOTA | XFSMNT_UQUOTAENF;			referenced = 1;		} else if (!strcmp(this_char, MNTOPT_QUOTANOENF) ||			   !strcmp(this_char, MNTOPT_UQUOTANOENF)) {			args->flags |= XFSMNT_UQUOTA;			args->flags &= ~XFSMNT_UQUOTAENF;			referenced = 1;		} else if (!strcmp(this_char, MNTOPT_GQUOTA) ||			   !strcmp(this_char, MNTOPT_GRPQUOTA)) {			args->flags |= XFSMNT_GQUOTA | XFSMNT_GQUOTAENF;			referenced = 1;		} else if (!strcmp(this_char, MNTOPT_GQUOTANOENF)) {			args->flags |= XFSMNT_GQUOTA;			args->flags &= ~XFSMNT_GQUOTAENF;			referenced = 1;		} else {			if (local_options)				*(local_options-1) = ',';			continue;		}		while (length--)			*this_char++ = ',';	}	PVFS_PARSEARGS(BHV_NEXT(bhv), options, args, update, error);	if (!error && !referenced)		bhv_remove_vfsops(bhvtovfs(bhv), VFS_POSITION_QM);	return error;}STATIC intxfs_qm_showargs(	struct bhv_desc		*bhv,	struct seq_file		*m){	struct vfs		*vfsp = bhvtovfs(bhv);	struct xfs_mount	*mp = XFS_VFSTOM(vfsp);	int			error;	if (mp->m_qflags & XFS_UQUOTA_ACCT) {		(mp->m_qflags & XFS_UQUOTA_ENFD) ?			seq_puts(m, "," MNTOPT_USRQUOTA) :			seq_puts(m, "," MNTOPT_UQUOTANOENF);	}	if (mp->m_qflags & XFS_GQUOTA_ACCT) {		(mp->m_qflags & XFS_GQUOTA_ENFD) ?			seq_puts(m, "," MNTOPT_GRPQUOTA) :			seq_puts(m, "," MNTOPT_GQUOTANOENF);	}	if (!(mp->m_qflags & (XFS_UQUOTA_ACCT|XFS_GQUOTA_ACCT)))		seq_puts(m, "," MNTOPT_NOQUOTA);	PVFS_SHOWARGS(BHV_NEXT(bhv), m, error);	return error;}STATIC intxfs_qm_mount(	struct bhv_desc		*bhv,	struct xfs_mount_args	*args,	struct cred		*cr){	struct vfs		*vfsp = bhvtovfs(bhv);	struct xfs_mount	*mp = XFS_VFSTOM(vfsp);	int			error;	if (args->flags & (XFSMNT_UQUOTA | XFSMNT_GQUOTA))		xfs_qm_mount_quotainit(mp, args->flags);	PVFS_MOUNT(BHV_NEXT(bhv), args, cr, error);	return error;}STATIC intxfs_qm_syncall(	struct bhv_desc		*bhv,	int			flags,	cred_t			*credp){	struct vfs		*vfsp = bhvtovfs(bhv);	struct xfs_mount	*mp = XFS_VFSTOM(vfsp);	int			error;	/*	 * Get the Quota Manager to flush the dquots.	 */	if (XFS_IS_QUOTA_ON(mp)) {		if ((error = xfs_qm_sync(mp, flags))) {			/*			 * If we got an IO error, we will be shutting down.			 * So, there's nothing more for us to do here.			 */			ASSERT(error != EIO || XFS_FORCED_SHUTDOWN(mp));			if (XFS_FORCED_SHUTDOWN(mp)) {				return XFS_ERROR(error);			}		}	}	PVFS_SYNC(BHV_NEXT(bhv), flags, credp, error);	return error;}/* * When xfsquotas isn't installed and the superblock had quotas, we need to * clear the quotaflags from superblock. */STATIC voidxfs_mount_reset_sbqflags(	xfs_mount_t		*mp){	xfs_trans_t		*tp;	unsigned long		s;	mp->m_qflags = 0;	/*	 * It is OK to look at sb_qflags here in mount path,	 * without SB_LOCK.	 */	if (mp->m_sb.sb_qflags == 0)		return;	s = XFS_SB_LOCK(mp);	mp->m_sb.sb_qflags = 0;	XFS_SB_UNLOCK(mp, s);	/*	 * if the fs is readonly, let the incore superblock run	 * with quotas off but don't flush the update out to disk	 */	if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY)		return;#ifdef QUOTADEBUG	xfs_fs_cmn_err(CE_NOTE, mp, "Writing superblock quota changes");#endif	tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE);	if (xfs_trans_reserve(tp, 0, mp->m_sb.sb_sectsize + 128, 0, 0,				      XFS_DEFAULT_LOG_COUNT)) {		xfs_trans_cancel(tp, 0);		return;	}	xfs_mod_sb(tp, XFS_SB_QFLAGS);	xfs_trans_commit(tp, 0, NULL);}STATIC intxfs_qm_newmount(	xfs_mount_t	*mp,	uint		*needquotamount,	uint		*quotaflags){	uint		quotaondisk;	uint		uquotaondisk = 0, gquotaondisk = 0;	*quotaflags = 0;	*needquotamount = B_FALSE;	quotaondisk = XFS_SB_VERSION_HASQUOTA(&mp->m_sb) &&		mp->m_sb.sb_qflags & (XFS_UQUOTA_ACCT|XFS_GQUOTA_ACCT);	if (quotaondisk) {		uquotaondisk = mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT;		gquotaondisk = mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT;	}	/*	 * If the device itself is read-only, we can't allow	 * the user to change the state of quota on the mount -	 * this would generate a transaction on the ro device,	 * which would lead to an I/O error and shutdown	 */	if (((uquotaondisk && !XFS_IS_UQUOTA_ON(mp)) ||	    (!uquotaondisk &&  XFS_IS_UQUOTA_ON(mp)) ||	     (gquotaondisk && !XFS_IS_GQUOTA_ON(mp)) ||	    (!gquotaondisk &&  XFS_IS_GQUOTA_ON(mp)))  &&	    xfs_dev_is_read_only(mp, "changing quota state")) {		cmn_err(CE_WARN,			"XFS: please mount with%s%s%s.",			(!quotaondisk ? "out quota" : ""),			(uquotaondisk ? " usrquota" : ""),			(gquotaondisk ? " grpquota" : ""));		return XFS_ERROR(EPERM);	}	if (XFS_IS_QUOTA_ON(mp) || quotaondisk) {		/*		 * Call mount_quotas at this point only if we won't have to do		 * a quotacheck.		 */		if (quotaondisk && !XFS_QM_NEED_QUOTACHECK(mp)) {			/*			 * If the xfs quota code isn't installed,			 * we have to reset the quotachk'd bit.			 * If an error occured, qm_mount_quotas code			 * has already disabled quotas. So, just finish			 * mounting, and get on with the boring life			 * without disk quotas.			 */			if (xfs_qm_mount_quotas(mp))				xfs_mount_reset_sbqflags(mp);		} else {			/*			 * Clear the quota flags, but remember them. This			 * is so that the quota code doesn't get invoked			 * before we're ready. This can happen when an			 * inode goes inactive and wants to free blocks,			 * or via xfs_log_mount_finish.			 */			*needquotamount = B_TRUE;			*quotaflags = mp->m_qflags;			mp->m_qflags = 0;		}	}	return 0;}STATIC intxfs_qm_endmount(	xfs_mount_t	*mp,	uint		needquotamount,	uint		quotaflags){	if (needquotamount) {		ASSERT(mp->m_qflags == 0);		mp->m_qflags = quotaflags;		if (xfs_qm_mount_quotas(mp))			xfs_mount_reset_sbqflags(mp);	}#if defined(DEBUG) && defined(XFS_LOUD_RECOVERY)	if (! (XFS_IS_QUOTA_ON(mp)))		xfs_fs_cmn_err(CE_NOTE, mp, "Disk quotas not turned on");	else		xfs_fs_cmn_err(CE_NOTE, mp, "Disk quotas turned on");#endif#ifdef QUOTADEBUG	if (XFS_IS_QUOTA_ON(mp) && xfs_qm_internalqcheck(mp))		cmn_err(CE_WARN, "XFS: mount internalqcheck failed");#endif	return 0;}STATIC voidxfs_qm_dqrele_null(	xfs_dquot_t	*dq){	/*	 * Called from XFS, where we always check first for a NULL dquot.	 */	if (!dq)		return;	xfs_qm_dqrele(dq);}struct xfs_qmops xfs_qmcore_xfs = {	.xfs_qminit		= xfs_qm_newmount,	.xfs_qmdone		= xfs_qm_unmount_quotadestroy,	.xfs_qmmount		= xfs_qm_endmount,	.xfs_qmunmount		= xfs_qm_unmount_quotas,	.xfs_dqrele		= xfs_qm_dqrele_null,	.xfs_dqattach		= xfs_qm_dqattach,	.xfs_dqdetach		= xfs_qm_dqdetach,	.xfs_dqpurgeall		= xfs_qm_dqpurge_all,	.xfs_dqvopalloc		= xfs_qm_vop_dqalloc,	.xfs_dqvopcreate	= xfs_qm_vop_dqattach_and_dqmod_newinode,	.xfs_dqvoprename	= xfs_qm_vop_rename_dqattach,	.xfs_dqvopchown		= xfs_qm_vop_chown,	.xfs_dqvopchownresv	= xfs_qm_vop_chown_reserve,	.xfs_dqtrxops		= &xfs_trans_dquot_ops,};struct bhv_vfsops xfs_qmops = { {	BHV_IDENTITY_INIT(VFS_BHV_QM, VFS_POSITION_QM),	.vfs_parseargs		= xfs_qm_parseargs,	.vfs_showargs		= xfs_qm_showargs,	.vfs_mount		= xfs_qm_mount,	.vfs_sync		= xfs_qm_syncall,	.vfs_quotactl		= xfs_qm_quotactl, },};void __initxfs_qm_init(void){	static char	message[] __initdata =		KERN_INFO "SGI XFS Quota Management subsystem\n";	printk(message);	mutex_init(&xfs_Gqm_lock, MUTEX_DEFAULT, "xfs_qmlock");	vfs_bhv_set_custom(&xfs_qmops, &xfs_qmcore_xfs);	xfs_qm_init_procfs();}void __exitxfs_qm_exit(void){	vfs_bhv_clr_custom(&xfs_qmops);	xfs_qm_cleanup_procfs();	if (qm_dqzone)		kmem_cache_destroy(qm_dqzone);	if (qm_dqtrxzone)		kmem_cache_destroy(qm_dqtrxzone);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美喷潮久久久xxxxx| 国产激情一区二区三区桃花岛亚洲| 偷窥国产亚洲免费视频 | 日韩欧美一区二区不卡| 久久综合久久久久88| 亚洲日本青草视频在线怡红院| 亚洲精品久久7777| 精品在线一区二区三区| 99精品视频一区| 91精品黄色片免费大全| 国产精品久久久久久久久久久免费看| 亚洲午夜三级在线| 懂色av噜噜一区二区三区av| 欧美久久久影院| 国产精品久久久爽爽爽麻豆色哟哟| 日韩经典一区二区| 菠萝蜜视频在线观看一区| 在线综合视频播放| 成人欧美一区二区三区白人 | 日韩三区在线观看| 1区2区3区精品视频| 精品亚洲成a人| 91成人国产精品| 久久久另类综合| 五月天一区二区| 99精品久久只有精品| 欧美mv和日韩mv的网站| 樱桃国产成人精品视频| 丁香六月综合激情| 日韩一区二区三区四区| 一区二区三区免费在线观看| 国产一区二区三区四区五区美女 | 日本系列欧美系列| 91日韩在线专区| 26uuu另类欧美亚洲曰本| 亚洲电影在线播放| 91视频xxxx| 国产精品国产三级国产a| 国内外成人在线| 欧美一区二区三区在线视频| 亚洲精品欧美二区三区中文字幕| 国产专区欧美精品| 日韩限制级电影在线观看| 亚洲成人高清在线| 色中色一区二区| 国产精品久久久久久久久久久免费看 | 风间由美一区二区三区在线观看 | 国产91露脸合集magnet| 91精品国产入口| 亚洲一区自拍偷拍| 日本韩国视频一区二区| 国产精品看片你懂得| 国产精品影视网| 亚洲精品在线网站| 久久91精品久久久久久秒播| 欧美精品一卡两卡| 午夜国产精品影院在线观看| 欧美系列在线观看| 亚洲永久精品国产| 欧日韩精品视频| 亚洲激情在线播放| 色网综合在线观看| 国产精品传媒视频| www.av精品| 日韩码欧中文字| 91视频国产观看| 亚洲乱码国产乱码精品精98午夜| 97久久久精品综合88久久| 国产精品每日更新在线播放网址| 国产a视频精品免费观看| 国产日韩欧美精品一区| 国产suv精品一区二区6| 国产精品国产成人国产三级| www.欧美亚洲| 亚洲精品国产品国语在线app| 91看片淫黄大片一级| 一区二区三区 在线观看视频| 欧美性色综合网| 五月天激情综合网| 制服视频三区第一页精品| 久久精品国产精品亚洲红杏| 欧美精品一区二区在线播放 | 成人欧美一区二区三区视频网页| 成人动漫精品一区二区| 亚洲美女一区二区三区| 欧美亚洲动漫精品| 日韩精品乱码av一区二区| 欧美成人高清电影在线| 国产成人在线观看| 中文字幕一区二区三区在线不卡| 99re成人精品视频| 午夜精品123| 欧美精品一区二区在线播放| 丁香桃色午夜亚洲一区二区三区| 亚洲三级在线免费| 欧美日本视频在线| 国产一区二区三区四区五区美女| 国产精品国产三级国产aⅴ入口| 91久久精品一区二区三区| 日本不卡一二三区黄网| 久久免费看少妇高潮| 91在线国产观看| 亚洲成人av福利| www激情久久| 91在线精品秘密一区二区| 天天亚洲美女在线视频| 亚洲精品一区二区三区香蕉 | 亚洲国产精品人人做人人爽| 欧美一二区视频| 成人一级片网址| 亚洲一区免费在线观看| 精品国产免费人成在线观看| 成人免费观看av| 天堂av在线一区| 中文成人综合网| 欧美肥妇free| 豆国产96在线|亚洲| 丝袜亚洲另类欧美| 亚洲国产成人在线| 制服.丝袜.亚洲.另类.中文| 成人深夜在线观看| 日韩在线a电影| 亚洲欧洲精品一区二区精品久久久| 91国模大尺度私拍在线视频| 国内精品免费**视频| 亚洲一卡二卡三卡四卡无卡久久| 精品sm在线观看| 精品视频色一区| av在线这里只有精品| 久久99日本精品| 一区二区三区电影在线播| 久久久欧美精品sm网站| 欧美日韩高清一区二区不卡| 成人激情图片网| 麻豆精品在线播放| 亚洲福利一区二区三区| 日本最新不卡在线| 综合久久国产九一剧情麻豆| 欧美成人女星排行榜| 在线观看91精品国产入口| 国产91精品一区二区麻豆网站 | 日韩精品一区二区三区在线| 久久精品av麻豆的观看方式| 久久综合久色欧美综合狠狠| 高清成人免费视频| 久久av资源网| 三级不卡在线观看| 亚洲免费观看高清完整版在线观看熊 | 日韩伦理电影网| 久久久精品国产免大香伊| 日韩午夜激情视频| 在线看国产一区| 色伊人久久综合中文字幕| 东方欧美亚洲色图在线| 国产又黄又大久久| 免费成人在线网站| 天天av天天翘天天综合网| 亚洲一区二区三区小说| 亚洲三级电影网站| 国产精品天干天干在线综合| 久久久一区二区三区| 欧美岛国在线观看| 91精品国产91综合久久蜜臀| 欧美在线制服丝袜| 欧洲一区二区av| 日本乱人伦aⅴ精品| 91视频你懂的| 91论坛在线播放| 色综合天天做天天爱| 99久久精品费精品国产一区二区| 成人在线视频一区二区| 国产高清不卡一区二区| 国产成人精品影视| 国产精品一区二区三区99| 国产在线精品一区二区| 国产一区二区三区四区五区入口| 韩国成人在线视频| 国产精品综合av一区二区国产馆| 久久精品国产亚洲高清剧情介绍| 六月丁香综合在线视频| 寂寞少妇一区二区三区| 国产精品自拍三区| 成人精品免费网站| 成人动漫av在线| 色综合天天综合狠狠| 色久优优欧美色久优优| 在线日韩一区二区| 精品视频1区2区| 欧美一区永久视频免费观看| 欧美大片顶级少妇| 久久久99免费| 国产精品你懂的| 亚洲欧美日韩电影| 亚洲一区二区三区不卡国产欧美| 亚洲综合色自拍一区| 日韩经典中文字幕一区| 激情偷乱视频一区二区三区| 国产黄人亚洲片| 99久久国产综合精品麻豆| 欧美日韩一级片在线观看|