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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? xfs_trans_dquot.c

?? 優(yōu)龍2410linux2.6.8內(nèi)核源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) 2000-2002 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_trans.h"#include "xfs_sb.h"#include "xfs_ag.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_trans_priv.h"#include "xfs_qm.h"STATIC void	xfs_trans_alloc_dqinfo(xfs_trans_t *);/* * Add the locked dquot to the transaction. * The dquot must be locked, and it cannot be associated with any * transaction. */voidxfs_trans_dqjoin(	xfs_trans_t	*tp,	xfs_dquot_t	*dqp){	xfs_dq_logitem_t    *lp;	ASSERT(! XFS_DQ_IS_ADDEDTO_TRX(tp, dqp));	ASSERT(XFS_DQ_IS_LOCKED(dqp));	ASSERT(XFS_DQ_IS_LOGITEM_INITD(dqp));	lp = &dqp->q_logitem;	/*	 * Get a log_item_desc to point at the new item.	 */	(void) xfs_trans_add_item(tp, (xfs_log_item_t*)(lp));	/*	 * Initialize i_transp so we can later determine if this dquot is	 * associated with this transaction.	 */	dqp->q_transp = tp;}/* * This is called to mark the dquot as needing * to be logged when the transaction is committed.  The dquot must * already be associated with the given transaction. * Note that it marks the entire transaction as dirty. In the ordinary * case, this gets called via xfs_trans_commit, after the transaction * is already dirty. However, there's nothing stop this from getting * called directly, as done by xfs_qm_scall_setqlim. Hence, the TRANS_DIRTY * flag. */voidxfs_trans_log_dquot(	xfs_trans_t	*tp,	xfs_dquot_t	*dqp){	xfs_log_item_desc_t	*lidp;	ASSERT(XFS_DQ_IS_ADDEDTO_TRX(tp, dqp));	ASSERT(XFS_DQ_IS_LOCKED(dqp));	lidp = xfs_trans_find_item(tp, (xfs_log_item_t*)(&dqp->q_logitem));	ASSERT(lidp != NULL);	tp->t_flags |= XFS_TRANS_DIRTY;	lidp->lid_flags |= XFS_LID_DIRTY;}/* * Carry forward whatever is left of the quota blk reservation to * the spanky new transaction */STATIC voidxfs_trans_dup_dqinfo(	xfs_trans_t	*otp,	xfs_trans_t	*ntp){	xfs_dqtrx_t	*oq, *nq;	int		i,j;	xfs_dqtrx_t	*oqa, *nqa;	if (!otp->t_dqinfo)		return;	xfs_trans_alloc_dqinfo(ntp);	oqa = otp->t_dqinfo->dqa_usrdquots;	nqa = ntp->t_dqinfo->dqa_usrdquots;	/*	 * Because the quota blk reservation is carried forward,	 * it is also necessary to carry forward the DQ_DIRTY flag.	 */	if(otp->t_flags & XFS_TRANS_DQ_DIRTY)		ntp->t_flags |= XFS_TRANS_DQ_DIRTY;	for (j = 0; j < 2; j++) {		for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {			if (oqa[i].qt_dquot == NULL)				break;			oq = &oqa[i];			nq = &nqa[i];			nq->qt_dquot = oq->qt_dquot;			nq->qt_bcount_delta = nq->qt_icount_delta = 0;			nq->qt_rtbcount_delta = 0;			/*			 * Transfer whatever is left of the reservations.			 */			nq->qt_blk_res = oq->qt_blk_res - oq->qt_blk_res_used;			oq->qt_blk_res = oq->qt_blk_res_used;			nq->qt_rtblk_res = oq->qt_rtblk_res -				oq->qt_rtblk_res_used;			oq->qt_rtblk_res = oq->qt_rtblk_res_used;			nq->qt_ino_res = oq->qt_ino_res - oq->qt_ino_res_used;			oq->qt_ino_res = oq->qt_ino_res_used;		}		oqa = otp->t_dqinfo->dqa_grpdquots;		nqa = ntp->t_dqinfo->dqa_grpdquots;	}}/* * Wrap around mod_dquot to account for both user and group quotas. */voidxfs_trans_mod_dquot_byino(	xfs_trans_t	*tp,	xfs_inode_t	*ip,	uint		field,	long		delta){	xfs_mount_t	*mp;	ASSERT(tp);	mp = tp->t_mountp;	if (!XFS_IS_QUOTA_ON(mp) ||	    ip->i_ino == mp->m_sb.sb_uquotino ||	    ip->i_ino == mp->m_sb.sb_gquotino)		return;	if (tp->t_dqinfo == NULL)		xfs_trans_alloc_dqinfo(tp);	if (XFS_IS_UQUOTA_ON(mp) && ip->i_udquot) {		(void) xfs_trans_mod_dquot(tp, ip->i_udquot, field, delta);	}	if (XFS_IS_GQUOTA_ON(mp) && ip->i_gdquot) {		(void) xfs_trans_mod_dquot(tp, ip->i_gdquot, field, delta);	}}STATIC xfs_dqtrx_t *xfs_trans_get_dqtrx(	xfs_trans_t	*tp,	xfs_dquot_t	*dqp){	int		i;	xfs_dqtrx_t	*qa;	for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {		qa = XFS_QM_DQP_TO_DQACCT(tp, dqp);		if (qa[i].qt_dquot == NULL ||		    qa[i].qt_dquot == dqp) {			return (&qa[i]);		}	}	return (NULL);}/* * Make the changes in the transaction structure. * The moral equivalent to xfs_trans_mod_sb(). * We don't touch any fields in the dquot, so we don't care * if it's locked or not (most of the time it won't be). */voidxfs_trans_mod_dquot(	xfs_trans_t	*tp,	xfs_dquot_t	*dqp,	uint		field,	long		delta){	xfs_dqtrx_t	*qtrx;	ASSERT(tp);	qtrx = NULL;	if (tp->t_dqinfo == NULL)		xfs_trans_alloc_dqinfo(tp);	/*	 * Find either the first free slot or the slot that belongs	 * to this dquot.	 */	qtrx = xfs_trans_get_dqtrx(tp, dqp);	ASSERT(qtrx);	if (qtrx->qt_dquot == NULL)		qtrx->qt_dquot = dqp;	switch (field) {		/*		 * regular disk blk reservation		 */	      case XFS_TRANS_DQ_RES_BLKS:		qtrx->qt_blk_res += (ulong)delta;		break;		/*		 * inode reservation		 */	      case XFS_TRANS_DQ_RES_INOS:		qtrx->qt_ino_res += (ulong)delta;		break;		/*		 * disk blocks used.		 */	      case XFS_TRANS_DQ_BCOUNT:		if (qtrx->qt_blk_res && delta > 0) {			qtrx->qt_blk_res_used += (ulong)delta;			ASSERT(qtrx->qt_blk_res >= qtrx->qt_blk_res_used);		}		qtrx->qt_bcount_delta += delta;		break;	      case XFS_TRANS_DQ_DELBCOUNT:		qtrx->qt_delbcnt_delta += delta;		break;		/*		 * Inode Count		 */	      case XFS_TRANS_DQ_ICOUNT:		if (qtrx->qt_ino_res && delta > 0) {			qtrx->qt_ino_res_used += (ulong)delta;			ASSERT(qtrx->qt_ino_res >= qtrx->qt_ino_res_used);		}		qtrx->qt_icount_delta += delta;		break;		/*		 * rtblk reservation		 */	      case XFS_TRANS_DQ_RES_RTBLKS:		qtrx->qt_rtblk_res += (ulong)delta;		break;		/*		 * rtblk count		 */	      case XFS_TRANS_DQ_RTBCOUNT:		if (qtrx->qt_rtblk_res && delta > 0) {			qtrx->qt_rtblk_res_used += (ulong)delta;			ASSERT(qtrx->qt_rtblk_res >= qtrx->qt_rtblk_res_used);		}		qtrx->qt_rtbcount_delta += delta;		break;	      case XFS_TRANS_DQ_DELRTBCOUNT:		qtrx->qt_delrtb_delta += delta;		break;	      default:		ASSERT(0);	}	tp->t_flags |= XFS_TRANS_DQ_DIRTY;}/* * Given an array of dqtrx structures, lock all the dquots associated * and join them to the transaction, provided they have been modified. * We know that the highest number of dquots (of one type - usr OR grp), * involved in a transaction is 2 and that both usr and grp combined - 3. * So, we don't attempt to make this very generic. */STATIC voidxfs_trans_dqlockedjoin(	xfs_trans_t	*tp,	xfs_dqtrx_t	*q){	ASSERT(q[0].qt_dquot != NULL);	if (q[1].qt_dquot == NULL) {		xfs_dqlock(q[0].qt_dquot);		xfs_trans_dqjoin(tp, q[0].qt_dquot);	} else {		ASSERT(XFS_QM_TRANS_MAXDQS == 2);		xfs_dqlock2(q[0].qt_dquot, q[1].qt_dquot);		xfs_trans_dqjoin(tp, q[0].qt_dquot);		xfs_trans_dqjoin(tp, q[1].qt_dquot);	}}/* * Called by xfs_trans_commit() and similar in spirit to * xfs_trans_apply_sb_deltas(). * Go thru all the dquots belonging to this transaction and modify the * INCORE dquot to reflect the actual usages. * Unreserve just the reservations done by this transaction. * dquot is still left locked at exit. */voidxfs_trans_apply_dquot_deltas(	xfs_trans_t		*tp){	int			i, j;	xfs_dquot_t		*dqp;	xfs_dqtrx_t		*qtrx, *qa;	xfs_disk_dquot_t	*d;	long			totalbdelta;	long			totalrtbdelta;	if (! (tp->t_flags & XFS_TRANS_DQ_DIRTY))		return;	ASSERT(tp->t_dqinfo);	qa = tp->t_dqinfo->dqa_usrdquots;	for (j = 0; j < 2; j++) {		if (qa[0].qt_dquot == NULL) {			qa = tp->t_dqinfo->dqa_grpdquots;			continue;		}		/*		 * Lock all of the dquots and join them to the transaction.		 */		xfs_trans_dqlockedjoin(tp, qa);		for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {			qtrx = &qa[i];			/*			 * The array of dquots is filled			 * sequentially, not sparsely.			 */			if ((dqp = qtrx->qt_dquot) == NULL)				break;			ASSERT(XFS_DQ_IS_LOCKED(dqp));			ASSERT(XFS_DQ_IS_ADDEDTO_TRX(tp, dqp));			/*			 * adjust the actual number of blocks used			 */			d = &dqp->q_core;			/*			 * The issue here is - sometimes we don't make a blkquota			 * reservation intentionally to be fair to users			 * (when the amount is small). On the other hand,			 * delayed allocs do make reservations, but that's			 * outside of a transaction, so we have no			 * idea how much was really reserved.			 * So, here we've accumulated delayed allocation blks and			 * non-delay blks. The assumption is that the			 * delayed ones are always reserved (outside of a			 * transaction), and the others may or may not have			 * quota reservations.			 */			totalbdelta = qtrx->qt_bcount_delta +				qtrx->qt_delbcnt_delta;			totalrtbdelta = qtrx->qt_rtbcount_delta +				qtrx->qt_delrtb_delta;#ifdef QUOTADEBUG			if (totalbdelta < 0)				ASSERT(INT_GET(d->d_bcount, ARCH_CONVERT) >=				       (xfs_qcnt_t) -totalbdelta);			if (totalrtbdelta < 0)				ASSERT(INT_GET(d->d_rtbcount, ARCH_CONVERT) >=				       (xfs_qcnt_t) -totalrtbdelta);			if (qtrx->qt_icount_delta < 0)				ASSERT(INT_GET(d->d_icount, ARCH_CONVERT) >=				       (xfs_qcnt_t) -qtrx->qt_icount_delta);#endif			if (totalbdelta)				INT_MOD(d->d_bcount, ARCH_CONVERT, (xfs_qcnt_t)totalbdelta);			if (qtrx->qt_icount_delta)				INT_MOD(d->d_icount, ARCH_CONVERT, (xfs_qcnt_t)qtrx->qt_icount_delta);			if (totalrtbdelta)				INT_MOD(d->d_rtbcount, ARCH_CONVERT, (xfs_qcnt_t)totalrtbdelta);			/*			 * Start/reset the timer(s) if needed.			 */			xfs_qm_adjust_dqtimers(tp->t_mountp, d);			dqp->dq_flags |= XFS_DQ_DIRTY;			/*			 * add this to the list of items to get logged			 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产精品亚洲红杏| 亚洲一区二区在线观看视频 | 一本大道久久精品懂色aⅴ| 久久精品亚洲乱码伦伦中文| 国产精品69久久久久水密桃| 久久精品无码一区二区三区| 99久久婷婷国产| 亚洲国产中文字幕| 日韩手机在线导航| 国产精品123| 亚洲欧美精品午睡沙发| 在线看不卡av| 韩国理伦片一区二区三区在线播放| 国产日韩精品一区二区三区| 成人国产精品视频| 一区二区三区国产豹纹内裤在线| 这里只有精品视频在线观看| 久久66热re国产| 亚洲欧美日韩国产成人精品影院| 精品视频在线免费| 国产成人综合亚洲91猫咪| 最新欧美精品一区二区三区| 91精品国产乱| a级高清视频欧美日韩| 日产国产欧美视频一区精品| 国产欧美日产一区| 欧美久久久久免费| 不卡视频在线观看| 日韩黄色小视频| 亚洲视频中文字幕| 日韩欧美一二三| 91女神在线视频| 麻豆国产一区二区| 亚洲激情一二三区| 国产色产综合产在线视频| 欧美日韩免费观看一区三区| 国产福利一区在线观看| 亚洲bt欧美bt精品| 国产精品护士白丝一区av| 日韩色在线观看| 在线精品视频小说1| 国产精品一区二区你懂的| 性做久久久久久免费观看 | 91精选在线观看| 99re视频精品| 国产很黄免费观看久久| 奇米影视一区二区三区小说| 亚洲男同性视频| 中文字幕久久午夜不卡| 日韩精品一区二区三区swag| 在线亚洲精品福利网址导航| 国产精品一区专区| 蜜臀av一区二区| 午夜电影一区二区三区| 一区二区三区蜜桃| 综合网在线视频| 国产精品网曝门| 欧美精品一区二区三区很污很色的| 欧美午夜不卡视频| 日本道精品一区二区三区| 成人性生交大合| 国产成人夜色高潮福利影视| 老司机免费视频一区二区| 午夜av区久久| 午夜精品aaa| 亚洲chinese男男1069| 日本美女视频一区二区| 亚洲第一激情av| 一区二区三区.www| 亚洲一区二区四区蜜桃| 亚洲特黄一级片| 亚洲品质自拍视频| 一区二区三区在线免费播放| 国产精品成人免费在线| 亚洲图片你懂的| 亚洲丝袜精品丝袜在线| 亚洲精品一二三| 亚洲成人精品在线观看| 亚洲电影第三页| 亚洲不卡av一区二区三区| 三级久久三级久久久| 日本一区中文字幕| 久久99国内精品| 国产盗摄视频一区二区三区| 国产激情视频一区二区三区欧美| 高清成人免费视频| 91视频免费观看| 91福利在线免费观看| 欧美日韩亚洲综合一区二区三区| 欧美四级电影在线观看| 欧美另类变人与禽xxxxx| 91精品国产入口| 久久久久久久久久美女| 国产精品福利在线播放| 一区二区三区日本| 日韩在线卡一卡二| 捆绑调教美女网站视频一区| 国产麻豆欧美日韩一区| 99re免费视频精品全部| 欧美日韩免费电影| 日韩欧美国产一区在线观看| 久久久久久久一区| 亚洲精品久久7777| 日韩成人dvd| 国产91丝袜在线观看| 一道本成人在线| 91.com在线观看| 天堂影院一区二区| 国产在线乱码一区二区三区| www.色综合.com| 91精品国产色综合久久ai换脸 | 欧美日韩综合在线| 精品乱人伦一区二区三区| 国产精品久久久久毛片软件| 亚洲午夜久久久久久久久久久 | 欧美性猛交xxxx乱大交退制版| 欧美高清一级片在线| 国产亚洲欧美在线| 午夜一区二区三区视频| 国产一区二区三区电影在线观看| 97久久精品人人做人人爽| 日韩美一区二区三区| 亚洲天堂精品在线观看| 精品无码三级在线观看视频| 色狠狠桃花综合| 久久在线免费观看| 午夜精品久久久久影视| jlzzjlzz亚洲日本少妇| 欧美精品一区男女天堂| 亚洲综合色婷婷| 国产69精品久久99不卡| 日韩精品一区二区在线| 一区二区免费视频| 成人性生交大合| 精品久久久久久久久久久久包黑料 | 国产精品欧美一区喷水| 久色婷婷小香蕉久久| 欧美羞羞免费网站| 国产精品国产三级国产三级人妇 | bt欧美亚洲午夜电影天堂| 精品国产乱子伦一区| 一区二区成人在线| 成人av在线资源网| 精品少妇一区二区三区免费观看 | 亚洲精品久久嫩草网站秘色| 国产ts人妖一区二区| 精品日韩一区二区| 日日欢夜夜爽一区| 91成人在线免费观看| 亚洲免费资源在线播放| 国产91精品在线观看| 久久综合九色综合97_久久久| 日本成人在线不卡视频| 欧美日韩一区二区欧美激情| 中文字幕一区二区三区视频| 成人黄色777网| 国产日产欧美一区二区视频| 国内精品嫩模私拍在线| 91精品国产综合久久香蕉的特点| 亚洲成人一区二区| 欧美高清你懂得| 亚洲成人av一区二区| 欧美视频精品在线观看| 亚洲午夜羞羞片| 欧美午夜不卡视频| 午夜精品一区二区三区电影天堂 | 久久蜜桃av一区二区天堂| 麻豆精品在线看| 91麻豆精品国产91久久久使用方法| 亚洲成人免费观看| 91精品国产综合久久国产大片| 亚洲国产美女搞黄色| 精品1区2区3区| 午夜激情久久久| 日韩欧美你懂的| 国内精品国产成人国产三级粉色 | 国产亚洲综合性久久久影院| 欧美一区二区三区系列电影| 日韩高清在线一区| 欧美精品一区二区三区视频| 国产精品资源网站| 专区另类欧美日韩| 欧美午夜片在线观看| 日韩成人伦理电影在线观看| 欧美精品一区二区三区四区 | 日韩欧美一区二区三区在线| 国产一区二区在线影院| 国产欧美日韩精品一区| 日本高清不卡一区| 日韩精品欧美成人高清一区二区| 日韩精品在线看片z| 国产成人av电影在线观看| 中文字幕亚洲不卡| 91麻豆精品国产91久久久久久久久 | 精品免费视频.| 99久久精品久久久久久清纯| 午夜精品免费在线| 久久久久成人黄色影片| 日本高清无吗v一区| 久久成人免费网|