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

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

?? super.c

?? 這是著名的jffs2嵌入式日志文件系統(tǒng)的源代碼
?? C
字號(hào):
/* * JFFS2 -- Journalling Flash File System, Version 2. * * Copyright (C) 2001 Red Hat, Inc. * * Created by David Woodhouse <dwmw2@cambridge.redhat.com> * * The original JFFS, from which the design for JFFS2 was derived, * was designed and implemented by Axis Communications AB. * * The contents of this file are subject to the Red Hat eCos Public * License Version 1.1 (the "Licence"); you may not use this file * except in compliance with the Licence.  You may obtain a copy of * the Licence at http://www.redhat.com/ * * Software distributed under the Licence is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * See the Licence for the specific language governing rights and * limitations under the Licence. * * The Original Code is JFFS2 - Journalling Flash File System, version 2 * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License version 2 (the "GPL"), in * which case the provisions of the GPL are applicable instead of the * above.  If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the RHEPL, indicate your decision by * deleting the provisions above and replace them with the notice and * other provisions required by the GPL.  If you do not delete the * provisions above, a recipient may use your version of this file * under either the RHEPL or the GPL. * * $Id: super.c,v 1.48.2.2 2002/03/12 15:36:43 dwmw2 Exp $ * */#include <linux/config.h>#include <linux/kernel.h>#include <linux/module.h>#include <linux/version.h>#include <linux/slab.h>#include <linux/init.h>#include <linux/list.h>#include <linux/fs.h>#include <linux/jffs2.h>#include <linux/pagemap.h>#include <linux/mtd/mtd.h>#include <linux/interrupt.h>#include "nodelist.h"#ifndef MTD_BLOCK_MAJOR#define MTD_BLOCK_MAJOR 31#endifextern void jffs2_read_inode (struct inode *);void jffs2_put_super (struct super_block *);void jffs2_write_super (struct super_block *);static int jffs2_statfs (struct super_block *, struct statfs *);int jffs2_remount_fs (struct super_block *, int *, char *);extern void jffs2_clear_inode (struct inode *);static struct super_operations jffs2_super_operations ={	read_inode:	jffs2_read_inode,//	delete_inode:	jffs2_delete_inode,	put_super:	jffs2_put_super,	write_super:	jffs2_write_super,	statfs:		jffs2_statfs,	remount_fs:	jffs2_remount_fs,	clear_inode:	jffs2_clear_inode};static int jffs2_statfs(struct super_block *sb, struct statfs *buf){	struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);	unsigned long avail;	buf->f_type = JFFS2_SUPER_MAGIC;	buf->f_bsize = 1 << PAGE_SHIFT;	buf->f_blocks = c->flash_size >> PAGE_SHIFT;	buf->f_files = 0;	buf->f_ffree = 0;	buf->f_namelen = JFFS2_MAX_NAME_LEN;	spin_lock_bh(&c->erase_completion_lock);	avail = c->dirty_size + c->free_size;	if (avail > c->sector_size * JFFS2_RESERVED_BLOCKS_WRITE)		avail -= c->sector_size * JFFS2_RESERVED_BLOCKS_WRITE;	else		avail = 0;	buf->f_bavail = buf->f_bfree = avail >> PAGE_SHIFT;#if CONFIG_JFFS2_FS_DEBUG > 0	printk(KERN_DEBUG "STATFS:\n");	printk(KERN_DEBUG "flash_size: %08x\n", c->flash_size);	printk(KERN_DEBUG "used_size: %08x\n", c->used_size);	printk(KERN_DEBUG "dirty_size: %08x\n", c->dirty_size);	printk(KERN_DEBUG "free_size: %08x\n", c->free_size);	printk(KERN_DEBUG "erasing_size: %08x\n", c->erasing_size);	printk(KERN_DEBUG "bad_size: %08x\n", c->bad_size);	printk(KERN_DEBUG "sector_size: %08x\n", c->sector_size);	if (c->nextblock) {		printk(KERN_DEBUG "nextblock: 0x%08x\n", c->nextblock->offset);	} else {		printk(KERN_DEBUG "nextblock: NULL\n");	}	if (c->gcblock) {		printk(KERN_DEBUG "gcblock: 0x%08x\n", c->gcblock->offset);	} else {		printk(KERN_DEBUG "gcblock: NULL\n");	}	if (list_empty(&c->clean_list)) {		printk(KERN_DEBUG "clean_list: empty\n");	} else {		struct list_head *this;		list_for_each(this, &c->clean_list) {			struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);			printk(KERN_DEBUG "clean_list: %08x\n", jeb->offset);		}	}	if (list_empty(&c->dirty_list)) {		printk(KERN_DEBUG "dirty_list: empty\n");	} else {		struct list_head *this;		list_for_each(this, &c->dirty_list) {			struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);			printk(KERN_DEBUG "dirty_list: %08x\n", jeb->offset);		}	}	if (list_empty(&c->erasing_list)) {		printk(KERN_DEBUG "erasing_list: empty\n");	} else {		struct list_head *this;		list_for_each(this, &c->erasing_list) {			struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);			printk(KERN_DEBUG "erasing_list: %08x\n", jeb->offset);		}	}	if (list_empty(&c->erase_pending_list)) {		printk(KERN_DEBUG "erase_pending_list: empty\n");	} else {		struct list_head *this;		list_for_each(this, &c->erase_pending_list) {			struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);			printk(KERN_DEBUG "erase_pending_list: %08x\n", jeb->offset);		}	}	if (list_empty(&c->free_list)) {		printk(KERN_DEBUG "free_list: empty\n");	} else {		struct list_head *this;		list_for_each(this, &c->free_list) {			struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);			printk(KERN_DEBUG "free_list: %08x\n", jeb->offset);		}	}	if (list_empty(&c->bad_list)) {		printk(KERN_DEBUG "bad_list: empty\n");	} else {		struct list_head *this;		list_for_each(this, &c->bad_list) {			struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);			printk(KERN_DEBUG "bad_list: %08x\n", jeb->offset);		}	}	if (list_empty(&c->bad_used_list)) {		printk(KERN_DEBUG "bad_used_list: empty\n");	} else {		struct list_head *this;		list_for_each(this, &c->bad_used_list) {			struct jffs2_eraseblock *jeb = list_entry(this, struct jffs2_eraseblock, list);			printk(KERN_DEBUG "bad_used_list: %08x\n", jeb->offset);		}	}#endif /* CONFIG_JFFS2_FS_DEBUG */	spin_unlock_bh(&c->erase_completion_lock);	return 0;}static struct super_block *jffs2_read_super(struct super_block *sb, void *data, int silent){	struct jffs2_sb_info *c;	struct inode *root_i;	int i;	D1(printk(KERN_DEBUG "jffs2: read_super for device %s\n", kdevname(sb->s_dev)));	if (MAJOR(sb->s_dev) != MTD_BLOCK_MAJOR) {		if (!silent)			printk(KERN_DEBUG "jffs2: attempt to mount non-MTD device %s\n", kdevname(sb->s_dev));		return NULL;	}	c = JFFS2_SB_INFO(sb);	memset(c, 0, sizeof(*c));		c->mtd = get_mtd_device(NULL, MINOR(sb->s_dev));	if (!c->mtd) {		D1(printk(KERN_DEBUG "jffs2: MTD device #%u doesn't appear to exist\n", MINOR(sb->s_dev)));		return NULL;	}	c->sector_size = c->mtd->erasesize;	c->free_size = c->flash_size = c->mtd->size;	c->nr_blocks = c->mtd->size / c->mtd->erasesize;	c->blocks = kmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks, GFP_KERNEL);	if (!c->blocks)		goto out_mtd;	for (i=0; i<c->nr_blocks; i++) {		INIT_LIST_HEAD(&c->blocks[i].list);		c->blocks[i].offset = i * c->sector_size;		c->blocks[i].free_size = c->sector_size;		c->blocks[i].dirty_size = 0;		c->blocks[i].used_size = 0;		c->blocks[i].first_node = NULL;		c->blocks[i].last_node = NULL;	}			spin_lock_init(&c->nodelist_lock);	init_MUTEX(&c->alloc_sem);	init_waitqueue_head(&c->erase_wait);	spin_lock_init(&c->erase_completion_lock);	spin_lock_init(&c->inocache_lock);	INIT_LIST_HEAD(&c->clean_list);	INIT_LIST_HEAD(&c->dirty_list);	INIT_LIST_HEAD(&c->erasing_list);	INIT_LIST_HEAD(&c->erase_pending_list);	INIT_LIST_HEAD(&c->erase_complete_list);	INIT_LIST_HEAD(&c->free_list);	INIT_LIST_HEAD(&c->bad_list);	INIT_LIST_HEAD(&c->bad_used_list);	c->highest_ino = 1;	if (jffs2_build_filesystem(c)) {		D1(printk(KERN_DEBUG "build_fs failed\n"));		goto out_nodes;	}	sb->s_op = &jffs2_super_operations;	D1(printk(KERN_DEBUG "jffs2_read_super(): Getting root inode\n"));	root_i = iget(sb, 1);	if (is_bad_inode(root_i)) {		D1(printk(KERN_WARNING "get root inode failed\n"));		goto out_nodes;	}	D1(printk(KERN_DEBUG "jffs2_read_super(): d_alloc_root()\n"));	sb->s_root = d_alloc_root(root_i);	if (!sb->s_root)		goto out_root_i;#if LINUX_VERSION_CODE >= 0x20403	sb->s_maxbytes = 0xFFFFFFFF;#endif	sb->s_blocksize = PAGE_CACHE_SIZE;	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;	sb->s_magic = JFFS2_SUPER_MAGIC;	if (!(sb->s_flags & MS_RDONLY))		jffs2_start_garbage_collect_thread(c);	return sb; out_root_i:	iput(root_i); out_nodes:	jffs2_free_ino_caches(c);	jffs2_free_raw_node_refs(c);	kfree(c->blocks); out_mtd:	put_mtd_device(c->mtd);	return NULL;}void jffs2_put_super (struct super_block *sb){	struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);	D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n"));	if (!(sb->s_flags & MS_RDONLY))		jffs2_stop_garbage_collect_thread(c);	jffs2_free_ino_caches(c);	jffs2_free_raw_node_refs(c);	kfree(c->blocks);	if (c->mtd->sync)		c->mtd->sync(c->mtd);	put_mtd_device(c->mtd);		D1(printk(KERN_DEBUG "jffs2_put_super returning\n"));}int jffs2_remount_fs (struct super_block *sb, int *flags, char *data){	struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);	if (c->flags & JFFS2_SB_FLAG_RO && !(sb->s_flags & MS_RDONLY))		return -EROFS;	/* We stop if it was running, then restart if it needs to.	   This also catches the case where it was stopped and this	   is just a remount to restart it */	if (!(sb->s_flags & MS_RDONLY))		jffs2_stop_garbage_collect_thread(c);	if (!(*flags & MS_RDONLY))		jffs2_start_garbage_collect_thread(c);		sb->s_flags = (sb->s_flags & ~MS_RDONLY)|(*flags & MS_RDONLY);	return 0;}void jffs2_write_super (struct super_block *sb){	struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);	sb->s_dirt = 0;	if (sb->s_flags & MS_RDONLY)		return;	jffs2_garbage_collect_trigger(c);	jffs2_erase_pending_blocks(c);	jffs2_mark_erased_blocks(c);}static DECLARE_FSTYPE_DEV(jffs2_fs_type, "jffs2", jffs2_read_super);static int __init init_jffs2_fs(void){	int ret;	printk(KERN_NOTICE "JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.\n");#ifdef JFFS2_OUT_OF_KERNEL	/* sanity checks. Could we do these at compile time? */	if (sizeof(struct jffs2_sb_info) > sizeof (((struct super_block *)NULL)->u)) {		printk(KERN_ERR "JFFS2 error: struct jffs2_sb_info (%d bytes) doesn't fit in the super_block union (%d bytes)\n", 		       sizeof(struct jffs2_sb_info), sizeof (((struct super_block *)NULL)->u));		return -EIO;	}	if (sizeof(struct jffs2_inode_info) > sizeof (((struct inode *)NULL)->u)) {		printk(KERN_ERR "JFFS2 error: struct jffs2_inode_info (%d bytes) doesn't fit in the inode union (%d bytes)\n", 		       sizeof(struct jffs2_inode_info), sizeof (((struct inode *)NULL)->u));		return -EIO;	}#endif	ret = jffs2_create_slab_caches();	if (ret) {		printk(KERN_ERR "JFFS2 error: Failed to initialise slab caches\n");		return ret;	}	ret = register_filesystem(&jffs2_fs_type);	if (ret) {		printk(KERN_ERR "JFFS2 error: Failed to register filesystem\n");		jffs2_destroy_slab_caches();	}	return ret;}static void __exit exit_jffs2_fs(void){	jffs2_destroy_slab_caches();	unregister_filesystem(&jffs2_fs_type);}module_init(init_jffs2_fs);module_exit(exit_jffs2_fs);MODULE_DESCRIPTION("The Journalling Flash File System, v2");MODULE_AUTHOR("Red Hat, Inc.");MODULE_LICENSE("GPL"); // Actually dual-licensed, but it doesn't matter for 		       // the sake of this tag. It's Free Software.

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看一区二区视频| 在线观看91视频| 亚洲一线二线三线久久久| 在线播放亚洲一区| 国产成人丝袜美腿| 日本成人超碰在线观看| 国产精品沙发午睡系列990531| 精品污污网站免费看| 成人免费黄色大片| 麻豆国产欧美日韩综合精品二区 | 韩国午夜理伦三级不卡影院| 亚洲视频香蕉人妖| 久久免费视频色| 91麻豆精品国产91久久久| 一本色道综合亚洲| 懂色av一区二区夜夜嗨| 日本aⅴ精品一区二区三区 | 日韩精品福利网| 一区二区三区在线视频观看58 | 欧美va亚洲va| 欧美人妖巨大在线| 在线观看亚洲精品视频| 成a人片国产精品| 国产精品亚洲第一区在线暖暖韩国| 五月天一区二区| 一区二区视频免费在线观看| 国产精品亲子乱子伦xxxx裸| 久久久久久免费网| 日韩免费在线观看| 91精品国产高清一区二区三区| 欧美性色aⅴ视频一区日韩精品| 不卡的看片网站| 粉嫩久久99精品久久久久久夜| 韩国午夜理伦三级不卡影院| 毛片一区二区三区| 蜜臀91精品一区二区三区 | 久久精品人人爽人人爽| 欧美大白屁股肥臀xxxxxx| 91精品国产综合久久福利| 欧美视频一区二区三区在线观看| 91美女在线观看| 色欧美日韩亚洲| 日本二三区不卡| 欧美性猛交xxxxxxxx| 精品视频在线免费| 欧美精品日日鲁夜夜添| 欧美日韩国产高清一区| 欧美精品色综合| 日韩欧美一区二区在线视频| 欧美成人一区二区三区| 欧美精品一区视频| 国产人伦精品一区二区| 国产精品久久夜| 亚洲欧美日韩国产一区二区三区| 亚洲美女在线国产| 亚洲www啪成人一区二区麻豆| 天堂成人免费av电影一区| 美女网站视频久久| 国产精品 日产精品 欧美精品| 国产成+人+日韩+欧美+亚洲| 成人aaaa免费全部观看| 一本色道久久综合亚洲91| 欧美在线观看视频一区二区三区 | 国产日本一区二区| 日韩伦理电影网| 亚洲成人免费看| 久久不见久久见免费视频7| 国产经典欧美精品| 色偷偷88欧美精品久久久| 欧美日韩免费观看一区三区| 欧美成人一区二区三区在线观看| 欧美激情综合在线| 亚洲精品日韩综合观看成人91| 香蕉成人伊视频在线观看| 久草热8精品视频在线观看| 国产一区 二区| 一本大道久久a久久精品综合| 欧美二区乱c少妇| 久久精品欧美日韩| 一区二区三区视频在线看| 久久精品国产秦先生| voyeur盗摄精品| 欧美肥妇free| 国产精品久久久99| 蜜臀久久99精品久久久久久9| 丰满少妇在线播放bd日韩电影| 在线观看视频欧美| 久久―日本道色综合久久| 亚洲蜜臀av乱码久久精品| 麻豆精品一区二区av白丝在线| 成人精品一区二区三区四区| 8x福利精品第一导航| 中文字幕乱码久久午夜不卡| 午夜视频一区在线观看| 成人午夜av影视| 日韩一卡二卡三卡四卡| ...av二区三区久久精品| 热久久免费视频| 色天使色偷偷av一区二区| 久久久久久麻豆| 秋霞影院一区二区| 在线观看一区不卡| 国产精品久久久99| 国产综合色在线视频区| 欧美伦理影视网| 18成人在线观看| 国产精品一线二线三线精华| 欧美福利视频一区| 一区二区三区视频在线观看| 国产很黄免费观看久久| 日韩一级黄色大片| 一区二区三区欧美在线观看| 不卡视频在线看| 久久久久久一二三区| 蜜桃视频在线一区| 欧美日韩免费观看一区三区| 亚洲精品成人天堂一二三| 盗摄精品av一区二区三区| 欧美成人午夜电影| 日本一不卡视频| 欧美电影影音先锋| 亚洲国产毛片aaaaa无费看| 99精品视频在线观看免费| 国产日韩一级二级三级| 精品一区二区三区在线播放视频| 欧美精品v国产精品v日韩精品 | 91麻豆高清视频| 中文字幕不卡在线| 国产成人鲁色资源国产91色综| 日韩区在线观看| 免费久久99精品国产| 欧美一区二区在线免费观看| 亚洲成a人片在线不卡一二三区 | 成人午夜激情视频| 国产欧美一区二区三区在线看蜜臀 | 在线中文字幕不卡| 亚洲男人天堂一区| 色综合久久综合网欧美综合网 | 日本乱人伦aⅴ精品| 自拍偷在线精品自拍偷无码专区 | 色综合激情五月| 亚洲美女区一区| 色成人在线视频| 一区av在线播放| 欧美视频一区二区三区四区| 午夜精品久久久| 91精品国产欧美一区二区成人| 日韩不卡一二三区| 欧美v亚洲v综合ⅴ国产v| 国产综合一区二区| 欧美国产日韩a欧美在线观看| 成人免费视频caoporn| 亚洲欧洲三级电影| 在线精品视频一区二区三四| 亚洲国产精品视频| 欧美成人官网二区| 国产成人免费xxxxxxxx| 亚洲美女淫视频| 欧美猛男超大videosgay| 久久精品国产秦先生| 国产日韩欧美高清在线| 91视频在线观看免费| 亚洲福利一区二区三区| 欧美videos中文字幕| 国产二区国产一区在线观看| 亚洲人成亚洲人成在线观看图片| 在线观看视频欧美| 久久国产精品一区二区| 国产午夜精品理论片a级大结局| 99视频在线精品| 香蕉影视欧美成人| 久久久青草青青国产亚洲免观| 99视频在线精品| 日韩二区在线观看| 国产精品天干天干在观线| 欧美性视频一区二区三区| 老司机一区二区| 亚洲日本在线a| 日韩女优毛片在线| 91丨porny丨中文| 麻豆精品在线观看| 亚洲欧美另类久久久精品2019| 欧美一区二区三区视频| 国产·精品毛片| 视频一区中文字幕国产| 中文一区一区三区高中清不卡| 欧美亚洲综合在线| 国产成人啪免费观看软件| 亚洲电影在线播放| 久久久久一区二区三区四区| 欧美网站大全在线观看| 国产河南妇女毛片精品久久久 | 亚洲三级在线免费| 欧美大度的电影原声| 色婷婷av一区二区三区大白胸| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美一级高清片| 91小视频在线| 国产成人综合在线| 麻豆国产欧美日韩综合精品二区 |