inode.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. /*
  2. * QNX4 file system, Linux implementation.
  3. *
  4. * Version : 0.2.1
  5. *
  6. * Using parts of the xiafs filesystem.
  7. *
  8. * History :
  9. *
  10. * 01-06-1998 by Richard Frowijn : first release.
  11. * 20-06-1998 by Frank Denis : Linux 2.1.99+ support, boot signature, misc.
  12. * 30-06-1998 by Frank Denis : first step to write inodes.
  13. */
  14. #include <linux/module.h>
  15. #include <linux/types.h>
  16. #include <linux/string.h>
  17. #include <linux/errno.h>
  18. #include <linux/slab.h>
  19. #include <linux/fs.h>
  20. #include <linux/qnx4_fs.h>
  21. #include <linux/init.h>
  22. #include <linux/highuid.h>
  23. #include <linux/smp_lock.h>
  24. #include <linux/pagemap.h>
  25. #include <linux/buffer_head.h>
  26. #include <linux/vfs.h>
  27. #include <asm/uaccess.h>
  28. #define QNX4_VERSION 4
  29. #define QNX4_BMNAME ".bitmap"
  30. static const struct super_operations qnx4_sops;
  31. #ifdef CONFIG_QNX4FS_RW
  32. int qnx4_sync_inode(struct inode *inode)
  33. {
  34. int err = 0;
  35. # if 0
  36. struct buffer_head *bh;
  37. bh = qnx4_update_inode(inode);
  38. if (bh && buffer_dirty(bh))
  39. {
  40. sync_dirty_buffer(bh);
  41. if (buffer_req(bh) && !buffer_uptodate(bh))
  42. {
  43. printk ("IO error syncing qnx4 inode [%s:%08lx]\n",
  44. inode->i_sb->s_id, inode->i_ino);
  45. err = -1;
  46. }
  47. brelse (bh);
  48. } else if (!bh) {
  49. err = -1;
  50. }
  51. # endif
  52. return err;
  53. }
  54. static void qnx4_delete_inode(struct inode *inode)
  55. {
  56. QNX4DEBUG(("qnx4: deleting inode [%lu]\n", (unsigned long) inode->i_ino));
  57. truncate_inode_pages(&inode->i_data, 0);
  58. inode->i_size = 0;
  59. qnx4_truncate(inode);
  60. lock_kernel();
  61. qnx4_free_inode(inode);
  62. unlock_kernel();
  63. }
  64. static void qnx4_write_super(struct super_block *sb)
  65. {
  66. lock_kernel();
  67. QNX4DEBUG(("qnx4: write_super\n"));
  68. sb->s_dirt = 0;
  69. unlock_kernel();
  70. }
  71. static int qnx4_write_inode(struct inode *inode, int unused)
  72. {
  73. struct qnx4_inode_entry *raw_inode;
  74. int block, ino;
  75. struct buffer_head *bh;
  76. ino = inode->i_ino;
  77. QNX4DEBUG(("qnx4: write inode 1.\n"));
  78. if (inode->i_nlink == 0) {
  79. return 0;
  80. }
  81. if (!ino) {
  82. printk("qnx4: bad inode number on dev %s: %d is out of range\n",
  83. inode->i_sb->s_id, ino);
  84. return -EIO;
  85. }
  86. QNX4DEBUG(("qnx4: write inode 2.\n"));
  87. block = ino / QNX4_INODES_PER_BLOCK;
  88. lock_kernel();
  89. if (!(bh = sb_bread(inode->i_sb, block))) {
  90. printk("qnx4: major problem: unable to read inode from dev "
  91. "%s\n", inode->i_sb->s_id);
  92. unlock_kernel();
  93. return -EIO;
  94. }
  95. raw_inode = ((struct qnx4_inode_entry *) bh->b_data) +
  96. (ino % QNX4_INODES_PER_BLOCK);
  97. raw_inode->di_mode = cpu_to_le16(inode->i_mode);
  98. raw_inode->di_uid = cpu_to_le16(fs_high2lowuid(inode->i_uid));
  99. raw_inode->di_gid = cpu_to_le16(fs_high2lowgid(inode->i_gid));
  100. raw_inode->di_nlink = cpu_to_le16(inode->i_nlink);
  101. raw_inode->di_size = cpu_to_le32(inode->i_size);
  102. raw_inode->di_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
  103. raw_inode->di_atime = cpu_to_le32(inode->i_atime.tv_sec);
  104. raw_inode->di_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
  105. raw_inode->di_first_xtnt.xtnt_size = cpu_to_le32(inode->i_blocks);
  106. mark_buffer_dirty(bh);
  107. brelse(bh);
  108. unlock_kernel();
  109. return 0;
  110. }
  111. #endif
  112. static void qnx4_put_super(struct super_block *sb);
  113. static struct inode *qnx4_alloc_inode(struct super_block *sb);
  114. static void qnx4_destroy_inode(struct inode *inode);
  115. static void qnx4_read_inode(struct inode *);
  116. static int qnx4_remount(struct super_block *sb, int *flags, char *data);
  117. static int qnx4_statfs(struct dentry *, struct kstatfs *);
  118. static const struct super_operations qnx4_sops =
  119. {
  120. .alloc_inode = qnx4_alloc_inode,
  121. .destroy_inode = qnx4_destroy_inode,
  122. .read_inode = qnx4_read_inode,
  123. .put_super = qnx4_put_super,
  124. .statfs = qnx4_statfs,
  125. .remount_fs = qnx4_remount,
  126. #ifdef CONFIG_QNX4FS_RW
  127. .write_inode = qnx4_write_inode,
  128. .delete_inode = qnx4_delete_inode,
  129. .write_super = qnx4_write_super,
  130. #endif
  131. };
  132. static int qnx4_remount(struct super_block *sb, int *flags, char *data)
  133. {
  134. struct qnx4_sb_info *qs;
  135. qs = qnx4_sb(sb);
  136. qs->Version = QNX4_VERSION;
  137. #ifndef CONFIG_QNX4FS_RW
  138. *flags |= MS_RDONLY;
  139. #endif
  140. if (*flags & MS_RDONLY) {
  141. return 0;
  142. }
  143. mark_buffer_dirty(qs->sb_buf);
  144. return 0;
  145. }
  146. static struct buffer_head *qnx4_getblk(struct inode *inode, int nr,
  147. int create)
  148. {
  149. struct buffer_head *result = NULL;
  150. if ( nr >= 0 )
  151. nr = qnx4_block_map( inode, nr );
  152. if (nr) {
  153. result = sb_getblk(inode->i_sb, nr);
  154. return result;
  155. }
  156. if (!create) {
  157. return NULL;
  158. }
  159. #if 0
  160. tmp = qnx4_new_block(inode->i_sb);
  161. if (!tmp) {
  162. return NULL;
  163. }
  164. result = sb_getblk(inode->i_sb, tmp);
  165. if (tst) {
  166. qnx4_free_block(inode->i_sb, tmp);
  167. brelse(result);
  168. goto repeat;
  169. }
  170. tst = tmp;
  171. #endif
  172. inode->i_ctime = CURRENT_TIME_SEC;
  173. mark_inode_dirty(inode);
  174. return result;
  175. }
  176. struct buffer_head *qnx4_bread(struct inode *inode, int block, int create)
  177. {
  178. struct buffer_head *bh;
  179. bh = qnx4_getblk(inode, block, create);
  180. if (!bh || buffer_uptodate(bh)) {
  181. return bh;
  182. }
  183. ll_rw_block(READ, 1, &bh);
  184. wait_on_buffer(bh);
  185. if (buffer_uptodate(bh)) {
  186. return bh;
  187. }
  188. brelse(bh);
  189. return NULL;
  190. }
  191. static int qnx4_get_block( struct inode *inode, sector_t iblock, struct buffer_head *bh, int create )
  192. {
  193. unsigned long phys;
  194. QNX4DEBUG(("qnx4: qnx4_get_block inode=[%ld] iblock=[%ld]\n",inode->i_ino,iblock));
  195. phys = qnx4_block_map( inode, iblock );
  196. if ( phys ) {
  197. // logical block is before EOF
  198. map_bh(bh, inode->i_sb, phys);
  199. } else if ( create ) {
  200. // to be done.
  201. }
  202. return 0;
  203. }
  204. unsigned long qnx4_block_map( struct inode *inode, long iblock )
  205. {
  206. int ix;
  207. long offset, i_xblk;
  208. unsigned long block = 0;
  209. struct buffer_head *bh = NULL;
  210. struct qnx4_xblk *xblk = NULL;
  211. struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode);
  212. u16 nxtnt = le16_to_cpu(qnx4_inode->di_num_xtnts);
  213. if ( iblock < le32_to_cpu(qnx4_inode->di_first_xtnt.xtnt_size) ) {
  214. // iblock is in the first extent. This is easy.
  215. block = le32_to_cpu(qnx4_inode->di_first_xtnt.xtnt_blk) + iblock - 1;
  216. } else {
  217. // iblock is beyond first extent. We have to follow the extent chain.
  218. i_xblk = le32_to_cpu(qnx4_inode->di_xblk);
  219. offset = iblock - le32_to_cpu(qnx4_inode->di_first_xtnt.xtnt_size);
  220. ix = 0;
  221. while ( --nxtnt > 0 ) {
  222. if ( ix == 0 ) {
  223. // read next xtnt block.
  224. bh = sb_bread(inode->i_sb, i_xblk - 1);
  225. if ( !bh ) {
  226. QNX4DEBUG(("qnx4: I/O error reading xtnt block [%ld])\n", i_xblk - 1));
  227. return -EIO;
  228. }
  229. xblk = (struct qnx4_xblk*)bh->b_data;
  230. if ( memcmp( xblk->xblk_signature, "IamXblk", 7 ) ) {
  231. QNX4DEBUG(("qnx4: block at %ld is not a valid xtnt\n", qnx4_inode->i_xblk));
  232. return -EIO;
  233. }
  234. }
  235. if ( offset < le32_to_cpu(xblk->xblk_xtnts[ix].xtnt_size) ) {
  236. // got it!
  237. block = le32_to_cpu(xblk->xblk_xtnts[ix].xtnt_blk) + offset - 1;
  238. break;
  239. }
  240. offset -= le32_to_cpu(xblk->xblk_xtnts[ix].xtnt_size);
  241. if ( ++ix >= xblk->xblk_num_xtnts ) {
  242. i_xblk = le32_to_cpu(xblk->xblk_next_xblk);
  243. ix = 0;
  244. brelse( bh );
  245. bh = NULL;
  246. }
  247. }
  248. if ( bh )
  249. brelse( bh );
  250. }
  251. QNX4DEBUG(("qnx4: mapping block %ld of inode %ld = %ld\n",iblock,inode->i_ino,block));
  252. return block;
  253. }
  254. static int qnx4_statfs(struct dentry *dentry, struct kstatfs *buf)
  255. {
  256. struct super_block *sb = dentry->d_sb;
  257. lock_kernel();
  258. buf->f_type = sb->s_magic;
  259. buf->f_bsize = sb->s_blocksize;
  260. buf->f_blocks = le32_to_cpu(qnx4_sb(sb)->BitMap->di_size) * 8;
  261. buf->f_bfree = qnx4_count_free_blocks(sb);
  262. buf->f_bavail = buf->f_bfree;
  263. buf->f_namelen = QNX4_NAME_MAX;
  264. unlock_kernel();
  265. return 0;
  266. }
  267. /*
  268. * Check the root directory of the filesystem to make sure
  269. * it really _is_ a qnx4 filesystem, and to check the size
  270. * of the directory entry.
  271. */
  272. static const char *qnx4_checkroot(struct super_block *sb)
  273. {
  274. struct buffer_head *bh;
  275. struct qnx4_inode_entry *rootdir;
  276. int rd, rl;
  277. int i, j;
  278. int found = 0;
  279. if (*(qnx4_sb(sb)->sb->RootDir.di_fname) != '/') {
  280. return "no qnx4 filesystem (no root dir).";
  281. } else {
  282. QNX4DEBUG(("QNX4 filesystem found on dev %s.\n", sb->s_id));
  283. rd = le32_to_cpu(qnx4_sb(sb)->sb->RootDir.di_first_xtnt.xtnt_blk) - 1;
  284. rl = le32_to_cpu(qnx4_sb(sb)->sb->RootDir.di_first_xtnt.xtnt_size);
  285. for (j = 0; j < rl; j++) {
  286. bh = sb_bread(sb, rd + j); /* root dir, first block */
  287. if (bh == NULL) {
  288. return "unable to read root entry.";
  289. }
  290. for (i = 0; i < QNX4_INODES_PER_BLOCK; i++) {
  291. rootdir = (struct qnx4_inode_entry *) (bh->b_data + i * QNX4_DIR_ENTRY_SIZE);
  292. if (rootdir->di_fname != NULL) {
  293. QNX4DEBUG(("Rootdir entry found : [%s]\n", rootdir->di_fname));
  294. if (!strncmp(rootdir->di_fname, QNX4_BMNAME, sizeof QNX4_BMNAME)) {
  295. found = 1;
  296. qnx4_sb(sb)->BitMap = kmalloc( sizeof( struct qnx4_inode_entry ), GFP_KERNEL );
  297. if (!qnx4_sb(sb)->BitMap) {
  298. brelse (bh);
  299. return "not enough memory for bitmap inode";
  300. }
  301. memcpy( qnx4_sb(sb)->BitMap, rootdir, sizeof( struct qnx4_inode_entry ) ); /* keep bitmap inode known */
  302. break;
  303. }
  304. }
  305. }
  306. brelse(bh);
  307. if (found != 0) {
  308. break;
  309. }
  310. }
  311. if (found == 0) {
  312. return "bitmap file not found.";
  313. }
  314. }
  315. return NULL;
  316. }
  317. static int qnx4_fill_super(struct super_block *s, void *data, int silent)
  318. {
  319. struct buffer_head *bh;
  320. struct inode *root;
  321. const char *errmsg;
  322. struct qnx4_sb_info *qs;
  323. qs = kzalloc(sizeof(struct qnx4_sb_info), GFP_KERNEL);
  324. if (!qs)
  325. return -ENOMEM;
  326. s->s_fs_info = qs;
  327. sb_set_blocksize(s, QNX4_BLOCK_SIZE);
  328. /* Check the superblock signature. Since the qnx4 code is
  329. dangerous, we should leave as quickly as possible
  330. if we don't belong here... */
  331. bh = sb_bread(s, 1);
  332. if (!bh) {
  333. printk("qnx4: unable to read the superblock\n");
  334. goto outnobh;
  335. }
  336. if ( le32_to_cpup((__le32*) bh->b_data) != QNX4_SUPER_MAGIC ) {
  337. if (!silent)
  338. printk("qnx4: wrong fsid in superblock.\n");
  339. goto out;
  340. }
  341. s->s_op = &qnx4_sops;
  342. s->s_magic = QNX4_SUPER_MAGIC;
  343. #ifndef CONFIG_QNX4FS_RW
  344. s->s_flags |= MS_RDONLY; /* Yup, read-only yet */
  345. #endif
  346. qnx4_sb(s)->sb_buf = bh;
  347. qnx4_sb(s)->sb = (struct qnx4_super_block *) bh->b_data;
  348. /* check before allocating dentries, inodes, .. */
  349. errmsg = qnx4_checkroot(s);
  350. if (errmsg != NULL) {
  351. if (!silent)
  352. printk("qnx4: %s\n", errmsg);
  353. goto out;
  354. }
  355. /* does root not have inode number QNX4_ROOT_INO ?? */
  356. root = iget(s, QNX4_ROOT_INO * QNX4_INODES_PER_BLOCK);
  357. if (!root) {
  358. printk("qnx4: get inode failed\n");
  359. goto out;
  360. }
  361. s->s_root = d_alloc_root(root);
  362. if (s->s_root == NULL)
  363. goto outi;
  364. brelse(bh);
  365. return 0;
  366. outi:
  367. iput(root);
  368. out:
  369. brelse(bh);
  370. outnobh:
  371. kfree(qs);
  372. s->s_fs_info = NULL;
  373. return -EINVAL;
  374. }
  375. static void qnx4_put_super(struct super_block *sb)
  376. {
  377. struct qnx4_sb_info *qs = qnx4_sb(sb);
  378. kfree( qs->BitMap );
  379. kfree( qs );
  380. sb->s_fs_info = NULL;
  381. return;
  382. }
  383. static int qnx4_writepage(struct page *page, struct writeback_control *wbc)
  384. {
  385. return block_write_full_page(page,qnx4_get_block, wbc);
  386. }
  387. static int qnx4_readpage(struct file *file, struct page *page)
  388. {
  389. return block_read_full_page(page,qnx4_get_block);
  390. }
  391. static int qnx4_prepare_write(struct file *file, struct page *page,
  392. unsigned from, unsigned to)
  393. {
  394. struct qnx4_inode_info *qnx4_inode = qnx4_i(page->mapping->host);
  395. return cont_prepare_write(page, from, to, qnx4_get_block,
  396. &qnx4_inode->mmu_private);
  397. }
  398. static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
  399. {
  400. return generic_block_bmap(mapping,block,qnx4_get_block);
  401. }
  402. static const struct address_space_operations qnx4_aops = {
  403. .readpage = qnx4_readpage,
  404. .writepage = qnx4_writepage,
  405. .sync_page = block_sync_page,
  406. .prepare_write = qnx4_prepare_write,
  407. .commit_write = generic_commit_write,
  408. .bmap = qnx4_bmap
  409. };
  410. static void qnx4_read_inode(struct inode *inode)
  411. {
  412. struct buffer_head *bh;
  413. struct qnx4_inode_entry *raw_inode;
  414. int block, ino;
  415. struct super_block *sb = inode->i_sb;
  416. struct qnx4_inode_entry *qnx4_inode = qnx4_raw_inode(inode);
  417. ino = inode->i_ino;
  418. inode->i_mode = 0;
  419. QNX4DEBUG(("Reading inode : [%d]\n", ino));
  420. if (!ino) {
  421. printk("qnx4: bad inode number on dev %s: %d is out of range\n",
  422. sb->s_id, ino);
  423. return;
  424. }
  425. block = ino / QNX4_INODES_PER_BLOCK;
  426. if (!(bh = sb_bread(sb, block))) {
  427. printk("qnx4: major problem: unable to read inode from dev "
  428. "%s\n", sb->s_id);
  429. return;
  430. }
  431. raw_inode = ((struct qnx4_inode_entry *) bh->b_data) +
  432. (ino % QNX4_INODES_PER_BLOCK);
  433. inode->i_mode = le16_to_cpu(raw_inode->di_mode);
  434. inode->i_uid = (uid_t)le16_to_cpu(raw_inode->di_uid);
  435. inode->i_gid = (gid_t)le16_to_cpu(raw_inode->di_gid);
  436. inode->i_nlink = le16_to_cpu(raw_inode->di_nlink);
  437. inode->i_size = le32_to_cpu(raw_inode->di_size);
  438. inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->di_mtime);
  439. inode->i_mtime.tv_nsec = 0;
  440. inode->i_atime.tv_sec = le32_to_cpu(raw_inode->di_atime);
  441. inode->i_atime.tv_nsec = 0;
  442. inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->di_ctime);
  443. inode->i_ctime.tv_nsec = 0;
  444. inode->i_blocks = le32_to_cpu(raw_inode->di_first_xtnt.xtnt_size);
  445. memcpy(qnx4_inode, raw_inode, QNX4_DIR_ENTRY_SIZE);
  446. if (S_ISREG(inode->i_mode)) {
  447. inode->i_op = &qnx4_file_inode_operations;
  448. inode->i_fop = &qnx4_file_operations;
  449. inode->i_mapping->a_ops = &qnx4_aops;
  450. qnx4_i(inode)->mmu_private = inode->i_size;
  451. } else if (S_ISDIR(inode->i_mode)) {
  452. inode->i_op = &qnx4_dir_inode_operations;
  453. inode->i_fop = &qnx4_dir_operations;
  454. } else if (S_ISLNK(inode->i_mode)) {
  455. inode->i_op = &page_symlink_inode_operations;
  456. inode->i_mapping->a_ops = &qnx4_aops;
  457. qnx4_i(inode)->mmu_private = inode->i_size;
  458. } else
  459. printk("qnx4: bad inode %d on dev %s\n",ino,sb->s_id);
  460. brelse(bh);
  461. }
  462. static struct kmem_cache *qnx4_inode_cachep;
  463. static struct inode *qnx4_alloc_inode(struct super_block *sb)
  464. {
  465. struct qnx4_inode_info *ei;
  466. ei = kmem_cache_alloc(qnx4_inode_cachep, GFP_KERNEL);
  467. if (!ei)
  468. return NULL;
  469. return &ei->vfs_inode;
  470. }
  471. static void qnx4_destroy_inode(struct inode *inode)
  472. {
  473. kmem_cache_free(qnx4_inode_cachep, qnx4_i(inode));
  474. }
  475. static void init_once(void *foo, struct kmem_cache * cachep,
  476. unsigned long flags)
  477. {
  478. struct qnx4_inode_info *ei = (struct qnx4_inode_info *) foo;
  479. if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
  480. SLAB_CTOR_CONSTRUCTOR)
  481. inode_init_once(&ei->vfs_inode);
  482. }
  483. static int init_inodecache(void)
  484. {
  485. qnx4_inode_cachep = kmem_cache_create("qnx4_inode_cache",
  486. sizeof(struct qnx4_inode_info),
  487. 0, (SLAB_RECLAIM_ACCOUNT|
  488. SLAB_MEM_SPREAD),
  489. init_once, NULL);
  490. if (qnx4_inode_cachep == NULL)
  491. return -ENOMEM;
  492. return 0;
  493. }
  494. static void destroy_inodecache(void)
  495. {
  496. kmem_cache_destroy(qnx4_inode_cachep);
  497. }
  498. static int qnx4_get_sb(struct file_system_type *fs_type,
  499. int flags, const char *dev_name, void *data, struct vfsmount *mnt)
  500. {
  501. return get_sb_bdev(fs_type, flags, dev_name, data, qnx4_fill_super,
  502. mnt);
  503. }
  504. static struct file_system_type qnx4_fs_type = {
  505. .owner = THIS_MODULE,
  506. .name = "qnx4",
  507. .get_sb = qnx4_get_sb,
  508. .kill_sb = kill_block_super,
  509. .fs_flags = FS_REQUIRES_DEV,
  510. };
  511. static int __init init_qnx4_fs(void)
  512. {
  513. int err;
  514. err = init_inodecache();
  515. if (err)
  516. return err;
  517. err = register_filesystem(&qnx4_fs_type);
  518. if (err) {
  519. destroy_inodecache();
  520. return err;
  521. }
  522. printk("QNX4 filesystem 0.2.3 registered.\n");
  523. return 0;
  524. }
  525. static void __exit exit_qnx4_fs(void)
  526. {
  527. unregister_filesystem(&qnx4_fs_type);
  528. destroy_inodecache();
  529. }
  530. module_init(init_qnx4_fs)
  531. module_exit(exit_qnx4_fs)
  532. MODULE_LICENSE("GPL");