xfs_attr_remote.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2000-2005 Silicon Graphics, Inc.
  4. * Copyright (c) 2013 Red Hat, Inc.
  5. * All Rights Reserved.
  6. */
  7. #include "xfs.h"
  8. #include "xfs_fs.h"
  9. #include "xfs_shared.h"
  10. #include "xfs_format.h"
  11. #include "xfs_log_format.h"
  12. #include "xfs_trans_resv.h"
  13. #include "xfs_bit.h"
  14. #include "xfs_mount.h"
  15. #include "xfs_defer.h"
  16. #include "xfs_da_format.h"
  17. #include "xfs_da_btree.h"
  18. #include "xfs_inode.h"
  19. #include "xfs_alloc.h"
  20. #include "xfs_trans.h"
  21. #include "xfs_inode_item.h"
  22. #include "xfs_bmap.h"
  23. #include "xfs_bmap_util.h"
  24. #include "xfs_attr.h"
  25. #include "xfs_attr_leaf.h"
  26. #include "xfs_attr_remote.h"
  27. #include "xfs_trans_space.h"
  28. #include "xfs_trace.h"
  29. #include "xfs_cksum.h"
  30. #include "xfs_buf_item.h"
  31. #include "xfs_error.h"
  32. #define ATTR_RMTVALUE_MAPSIZE 1 /* # of map entries at once */
  33. /*
  34. * Each contiguous block has a header, so it is not just a simple attribute
  35. * length to FSB conversion.
  36. */
  37. int
  38. xfs_attr3_rmt_blocks(
  39. struct xfs_mount *mp,
  40. int attrlen)
  41. {
  42. if (xfs_sb_version_hascrc(&mp->m_sb)) {
  43. int buflen = XFS_ATTR3_RMT_BUF_SPACE(mp, mp->m_sb.sb_blocksize);
  44. return (attrlen + buflen - 1) / buflen;
  45. }
  46. return XFS_B_TO_FSB(mp, attrlen);
  47. }
  48. /*
  49. * Checking of the remote attribute header is split into two parts. The verifier
  50. * does CRC, location and bounds checking, the unpacking function checks the
  51. * attribute parameters and owner.
  52. */
  53. static xfs_failaddr_t
  54. xfs_attr3_rmt_hdr_ok(
  55. void *ptr,
  56. xfs_ino_t ino,
  57. uint32_t offset,
  58. uint32_t size,
  59. xfs_daddr_t bno)
  60. {
  61. struct xfs_attr3_rmt_hdr *rmt = ptr;
  62. if (bno != be64_to_cpu(rmt->rm_blkno))
  63. return __this_address;
  64. if (offset != be32_to_cpu(rmt->rm_offset))
  65. return __this_address;
  66. if (size != be32_to_cpu(rmt->rm_bytes))
  67. return __this_address;
  68. if (ino != be64_to_cpu(rmt->rm_owner))
  69. return __this_address;
  70. /* ok */
  71. return NULL;
  72. }
  73. static xfs_failaddr_t
  74. xfs_attr3_rmt_verify(
  75. struct xfs_mount *mp,
  76. void *ptr,
  77. int fsbsize,
  78. xfs_daddr_t bno)
  79. {
  80. struct xfs_attr3_rmt_hdr *rmt = ptr;
  81. if (!xfs_sb_version_hascrc(&mp->m_sb))
  82. return __this_address;
  83. if (rmt->rm_magic != cpu_to_be32(XFS_ATTR3_RMT_MAGIC))
  84. return __this_address;
  85. if (!uuid_equal(&rmt->rm_uuid, &mp->m_sb.sb_meta_uuid))
  86. return __this_address;
  87. if (be64_to_cpu(rmt->rm_blkno) != bno)
  88. return __this_address;
  89. if (be32_to_cpu(rmt->rm_bytes) > fsbsize - sizeof(*rmt))
  90. return __this_address;
  91. if (be32_to_cpu(rmt->rm_offset) +
  92. be32_to_cpu(rmt->rm_bytes) > XFS_XATTR_SIZE_MAX)
  93. return __this_address;
  94. if (rmt->rm_owner == 0)
  95. return __this_address;
  96. return NULL;
  97. }
  98. static int
  99. __xfs_attr3_rmt_read_verify(
  100. struct xfs_buf *bp,
  101. bool check_crc,
  102. xfs_failaddr_t *failaddr)
  103. {
  104. struct xfs_mount *mp = bp->b_target->bt_mount;
  105. char *ptr;
  106. int len;
  107. xfs_daddr_t bno;
  108. int blksize = mp->m_attr_geo->blksize;
  109. /* no verification of non-crc buffers */
  110. if (!xfs_sb_version_hascrc(&mp->m_sb))
  111. return 0;
  112. ptr = bp->b_addr;
  113. bno = bp->b_bn;
  114. len = BBTOB(bp->b_length);
  115. ASSERT(len >= blksize);
  116. while (len > 0) {
  117. if (check_crc &&
  118. !xfs_verify_cksum(ptr, blksize, XFS_ATTR3_RMT_CRC_OFF)) {
  119. *failaddr = __this_address;
  120. return -EFSBADCRC;
  121. }
  122. *failaddr = xfs_attr3_rmt_verify(mp, ptr, blksize, bno);
  123. if (*failaddr)
  124. return -EFSCORRUPTED;
  125. len -= blksize;
  126. ptr += blksize;
  127. bno += BTOBB(blksize);
  128. }
  129. if (len != 0) {
  130. *failaddr = __this_address;
  131. return -EFSCORRUPTED;
  132. }
  133. return 0;
  134. }
  135. static void
  136. xfs_attr3_rmt_read_verify(
  137. struct xfs_buf *bp)
  138. {
  139. xfs_failaddr_t fa;
  140. int error;
  141. error = __xfs_attr3_rmt_read_verify(bp, true, &fa);
  142. if (error)
  143. xfs_verifier_error(bp, error, fa);
  144. }
  145. static xfs_failaddr_t
  146. xfs_attr3_rmt_verify_struct(
  147. struct xfs_buf *bp)
  148. {
  149. xfs_failaddr_t fa;
  150. int error;
  151. error = __xfs_attr3_rmt_read_verify(bp, false, &fa);
  152. return error ? fa : NULL;
  153. }
  154. static void
  155. xfs_attr3_rmt_write_verify(
  156. struct xfs_buf *bp)
  157. {
  158. struct xfs_mount *mp = bp->b_target->bt_mount;
  159. xfs_failaddr_t fa;
  160. int blksize = mp->m_attr_geo->blksize;
  161. char *ptr;
  162. int len;
  163. xfs_daddr_t bno;
  164. /* no verification of non-crc buffers */
  165. if (!xfs_sb_version_hascrc(&mp->m_sb))
  166. return;
  167. ptr = bp->b_addr;
  168. bno = bp->b_bn;
  169. len = BBTOB(bp->b_length);
  170. ASSERT(len >= blksize);
  171. while (len > 0) {
  172. struct xfs_attr3_rmt_hdr *rmt = (struct xfs_attr3_rmt_hdr *)ptr;
  173. fa = xfs_attr3_rmt_verify(mp, ptr, blksize, bno);
  174. if (fa) {
  175. xfs_verifier_error(bp, -EFSCORRUPTED, fa);
  176. return;
  177. }
  178. /*
  179. * Ensure we aren't writing bogus LSNs to disk. See
  180. * xfs_attr3_rmt_hdr_set() for the explanation.
  181. */
  182. if (rmt->rm_lsn != cpu_to_be64(NULLCOMMITLSN)) {
  183. xfs_verifier_error(bp, -EFSCORRUPTED, __this_address);
  184. return;
  185. }
  186. xfs_update_cksum(ptr, blksize, XFS_ATTR3_RMT_CRC_OFF);
  187. len -= blksize;
  188. ptr += blksize;
  189. bno += BTOBB(blksize);
  190. }
  191. if (len != 0)
  192. xfs_verifier_error(bp, -EFSCORRUPTED, __this_address);
  193. }
  194. const struct xfs_buf_ops xfs_attr3_rmt_buf_ops = {
  195. .name = "xfs_attr3_rmt",
  196. .verify_read = xfs_attr3_rmt_read_verify,
  197. .verify_write = xfs_attr3_rmt_write_verify,
  198. .verify_struct = xfs_attr3_rmt_verify_struct,
  199. };
  200. STATIC int
  201. xfs_attr3_rmt_hdr_set(
  202. struct xfs_mount *mp,
  203. void *ptr,
  204. xfs_ino_t ino,
  205. uint32_t offset,
  206. uint32_t size,
  207. xfs_daddr_t bno)
  208. {
  209. struct xfs_attr3_rmt_hdr *rmt = ptr;
  210. if (!xfs_sb_version_hascrc(&mp->m_sb))
  211. return 0;
  212. rmt->rm_magic = cpu_to_be32(XFS_ATTR3_RMT_MAGIC);
  213. rmt->rm_offset = cpu_to_be32(offset);
  214. rmt->rm_bytes = cpu_to_be32(size);
  215. uuid_copy(&rmt->rm_uuid, &mp->m_sb.sb_meta_uuid);
  216. rmt->rm_owner = cpu_to_be64(ino);
  217. rmt->rm_blkno = cpu_to_be64(bno);
  218. /*
  219. * Remote attribute blocks are written synchronously, so we don't
  220. * have an LSN that we can stamp in them that makes any sense to log
  221. * recovery. To ensure that log recovery handles overwrites of these
  222. * blocks sanely (i.e. once they've been freed and reallocated as some
  223. * other type of metadata) we need to ensure that the LSN has a value
  224. * that tells log recovery to ignore the LSN and overwrite the buffer
  225. * with whatever is in it's log. To do this, we use the magic
  226. * NULLCOMMITLSN to indicate that the LSN is invalid.
  227. */
  228. rmt->rm_lsn = cpu_to_be64(NULLCOMMITLSN);
  229. return sizeof(struct xfs_attr3_rmt_hdr);
  230. }
  231. /*
  232. * Helper functions to copy attribute data in and out of the one disk extents
  233. */
  234. STATIC int
  235. xfs_attr_rmtval_copyout(
  236. struct xfs_mount *mp,
  237. struct xfs_buf *bp,
  238. xfs_ino_t ino,
  239. int *offset,
  240. int *valuelen,
  241. uint8_t **dst)
  242. {
  243. char *src = bp->b_addr;
  244. xfs_daddr_t bno = bp->b_bn;
  245. int len = BBTOB(bp->b_length);
  246. int blksize = mp->m_attr_geo->blksize;
  247. ASSERT(len >= blksize);
  248. while (len > 0 && *valuelen > 0) {
  249. int hdr_size = 0;
  250. int byte_cnt = XFS_ATTR3_RMT_BUF_SPACE(mp, blksize);
  251. byte_cnt = min(*valuelen, byte_cnt);
  252. if (xfs_sb_version_hascrc(&mp->m_sb)) {
  253. if (xfs_attr3_rmt_hdr_ok(src, ino, *offset,
  254. byte_cnt, bno)) {
  255. xfs_alert(mp,
  256. "remote attribute header mismatch bno/off/len/owner (0x%llx/0x%x/Ox%x/0x%llx)",
  257. bno, *offset, byte_cnt, ino);
  258. return -EFSCORRUPTED;
  259. }
  260. hdr_size = sizeof(struct xfs_attr3_rmt_hdr);
  261. }
  262. memcpy(*dst, src + hdr_size, byte_cnt);
  263. /* roll buffer forwards */
  264. len -= blksize;
  265. src += blksize;
  266. bno += BTOBB(blksize);
  267. /* roll attribute data forwards */
  268. *valuelen -= byte_cnt;
  269. *dst += byte_cnt;
  270. *offset += byte_cnt;
  271. }
  272. return 0;
  273. }
  274. STATIC void
  275. xfs_attr_rmtval_copyin(
  276. struct xfs_mount *mp,
  277. struct xfs_buf *bp,
  278. xfs_ino_t ino,
  279. int *offset,
  280. int *valuelen,
  281. uint8_t **src)
  282. {
  283. char *dst = bp->b_addr;
  284. xfs_daddr_t bno = bp->b_bn;
  285. int len = BBTOB(bp->b_length);
  286. int blksize = mp->m_attr_geo->blksize;
  287. ASSERT(len >= blksize);
  288. while (len > 0 && *valuelen > 0) {
  289. int hdr_size;
  290. int byte_cnt = XFS_ATTR3_RMT_BUF_SPACE(mp, blksize);
  291. byte_cnt = min(*valuelen, byte_cnt);
  292. hdr_size = xfs_attr3_rmt_hdr_set(mp, dst, ino, *offset,
  293. byte_cnt, bno);
  294. memcpy(dst + hdr_size, *src, byte_cnt);
  295. /*
  296. * If this is the last block, zero the remainder of it.
  297. * Check that we are actually the last block, too.
  298. */
  299. if (byte_cnt + hdr_size < blksize) {
  300. ASSERT(*valuelen - byte_cnt == 0);
  301. ASSERT(len == blksize);
  302. memset(dst + hdr_size + byte_cnt, 0,
  303. blksize - hdr_size - byte_cnt);
  304. }
  305. /* roll buffer forwards */
  306. len -= blksize;
  307. dst += blksize;
  308. bno += BTOBB(blksize);
  309. /* roll attribute data forwards */
  310. *valuelen -= byte_cnt;
  311. *src += byte_cnt;
  312. *offset += byte_cnt;
  313. }
  314. }
  315. /*
  316. * Read the value associated with an attribute from the out-of-line buffer
  317. * that we stored it in.
  318. */
  319. int
  320. xfs_attr_rmtval_get(
  321. struct xfs_da_args *args)
  322. {
  323. struct xfs_bmbt_irec map[ATTR_RMTVALUE_MAPSIZE];
  324. struct xfs_mount *mp = args->dp->i_mount;
  325. struct xfs_buf *bp;
  326. xfs_dablk_t lblkno = args->rmtblkno;
  327. uint8_t *dst = args->value;
  328. int valuelen;
  329. int nmap;
  330. int error;
  331. int blkcnt = args->rmtblkcnt;
  332. int i;
  333. int offset = 0;
  334. trace_xfs_attr_rmtval_get(args);
  335. ASSERT(!(args->flags & ATTR_KERNOVAL));
  336. ASSERT(args->rmtvaluelen == args->valuelen);
  337. valuelen = args->rmtvaluelen;
  338. while (valuelen > 0) {
  339. nmap = ATTR_RMTVALUE_MAPSIZE;
  340. error = xfs_bmapi_read(args->dp, (xfs_fileoff_t)lblkno,
  341. blkcnt, map, &nmap,
  342. XFS_BMAPI_ATTRFORK);
  343. if (error)
  344. return error;
  345. ASSERT(nmap >= 1);
  346. for (i = 0; (i < nmap) && (valuelen > 0); i++) {
  347. xfs_daddr_t dblkno;
  348. int dblkcnt;
  349. ASSERT((map[i].br_startblock != DELAYSTARTBLOCK) &&
  350. (map[i].br_startblock != HOLESTARTBLOCK));
  351. dblkno = XFS_FSB_TO_DADDR(mp, map[i].br_startblock);
  352. dblkcnt = XFS_FSB_TO_BB(mp, map[i].br_blockcount);
  353. error = xfs_trans_read_buf(mp, args->trans,
  354. mp->m_ddev_targp,
  355. dblkno, dblkcnt, 0, &bp,
  356. &xfs_attr3_rmt_buf_ops);
  357. if (error)
  358. return error;
  359. error = xfs_attr_rmtval_copyout(mp, bp, args->dp->i_ino,
  360. &offset, &valuelen,
  361. &dst);
  362. xfs_trans_brelse(args->trans, bp);
  363. if (error)
  364. return error;
  365. /* roll attribute extent map forwards */
  366. lblkno += map[i].br_blockcount;
  367. blkcnt -= map[i].br_blockcount;
  368. }
  369. }
  370. ASSERT(valuelen == 0);
  371. return 0;
  372. }
  373. /*
  374. * Write the value associated with an attribute into the out-of-line buffer
  375. * that we have defined for it.
  376. */
  377. int
  378. xfs_attr_rmtval_set(
  379. struct xfs_da_args *args)
  380. {
  381. struct xfs_inode *dp = args->dp;
  382. struct xfs_mount *mp = dp->i_mount;
  383. struct xfs_bmbt_irec map;
  384. xfs_dablk_t lblkno;
  385. xfs_fileoff_t lfileoff = 0;
  386. uint8_t *src = args->value;
  387. int blkcnt;
  388. int valuelen;
  389. int nmap;
  390. int error;
  391. int offset = 0;
  392. trace_xfs_attr_rmtval_set(args);
  393. /*
  394. * Find a "hole" in the attribute address space large enough for
  395. * us to drop the new attribute's value into. Because CRC enable
  396. * attributes have headers, we can't just do a straight byte to FSB
  397. * conversion and have to take the header space into account.
  398. */
  399. blkcnt = xfs_attr3_rmt_blocks(mp, args->rmtvaluelen);
  400. error = xfs_bmap_first_unused(args->trans, args->dp, blkcnt, &lfileoff,
  401. XFS_ATTR_FORK);
  402. if (error)
  403. return error;
  404. args->rmtblkno = lblkno = (xfs_dablk_t)lfileoff;
  405. args->rmtblkcnt = blkcnt;
  406. /*
  407. * Roll through the "value", allocating blocks on disk as required.
  408. */
  409. while (blkcnt > 0) {
  410. /*
  411. * Allocate a single extent, up to the size of the value.
  412. *
  413. * Note that we have to consider this a data allocation as we
  414. * write the remote attribute without logging the contents.
  415. * Hence we must ensure that we aren't using blocks that are on
  416. * the busy list so that we don't overwrite blocks which have
  417. * recently been freed but their transactions are not yet
  418. * committed to disk. If we overwrite the contents of a busy
  419. * extent and then crash then the block may not contain the
  420. * correct metadata after log recovery occurs.
  421. */
  422. nmap = 1;
  423. error = xfs_bmapi_write(args->trans, dp, (xfs_fileoff_t)lblkno,
  424. blkcnt, XFS_BMAPI_ATTRFORK, args->total, &map,
  425. &nmap);
  426. if (error)
  427. return error;
  428. error = xfs_defer_finish(&args->trans);
  429. if (error)
  430. return error;
  431. ASSERT(nmap == 1);
  432. ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
  433. (map.br_startblock != HOLESTARTBLOCK));
  434. lblkno += map.br_blockcount;
  435. blkcnt -= map.br_blockcount;
  436. /*
  437. * Start the next trans in the chain.
  438. */
  439. error = xfs_trans_roll_inode(&args->trans, dp);
  440. if (error)
  441. return error;
  442. }
  443. /*
  444. * Roll through the "value", copying the attribute value to the
  445. * already-allocated blocks. Blocks are written synchronously
  446. * so that we can know they are all on disk before we turn off
  447. * the INCOMPLETE flag.
  448. */
  449. lblkno = args->rmtblkno;
  450. blkcnt = args->rmtblkcnt;
  451. valuelen = args->rmtvaluelen;
  452. while (valuelen > 0) {
  453. struct xfs_buf *bp;
  454. xfs_daddr_t dblkno;
  455. int dblkcnt;
  456. ASSERT(blkcnt > 0);
  457. nmap = 1;
  458. error = xfs_bmapi_read(dp, (xfs_fileoff_t)lblkno,
  459. blkcnt, &map, &nmap,
  460. XFS_BMAPI_ATTRFORK);
  461. if (error)
  462. return error;
  463. ASSERT(nmap == 1);
  464. ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
  465. (map.br_startblock != HOLESTARTBLOCK));
  466. dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock),
  467. dblkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);
  468. bp = xfs_buf_get(mp->m_ddev_targp, dblkno, dblkcnt, 0);
  469. if (!bp)
  470. return -ENOMEM;
  471. bp->b_ops = &xfs_attr3_rmt_buf_ops;
  472. xfs_attr_rmtval_copyin(mp, bp, args->dp->i_ino, &offset,
  473. &valuelen, &src);
  474. error = xfs_bwrite(bp); /* GROT: NOTE: synchronous write */
  475. xfs_buf_relse(bp);
  476. if (error)
  477. return error;
  478. /* roll attribute extent map forwards */
  479. lblkno += map.br_blockcount;
  480. blkcnt -= map.br_blockcount;
  481. }
  482. ASSERT(valuelen == 0);
  483. return 0;
  484. }
  485. /*
  486. * Remove the value associated with an attribute by deleting the
  487. * out-of-line buffer that it is stored on.
  488. */
  489. int
  490. xfs_attr_rmtval_remove(
  491. struct xfs_da_args *args)
  492. {
  493. struct xfs_mount *mp = args->dp->i_mount;
  494. xfs_dablk_t lblkno;
  495. int blkcnt;
  496. int error;
  497. int done;
  498. trace_xfs_attr_rmtval_remove(args);
  499. /*
  500. * Roll through the "value", invalidating the attribute value's blocks.
  501. */
  502. lblkno = args->rmtblkno;
  503. blkcnt = args->rmtblkcnt;
  504. while (blkcnt > 0) {
  505. struct xfs_bmbt_irec map;
  506. struct xfs_buf *bp;
  507. xfs_daddr_t dblkno;
  508. int dblkcnt;
  509. int nmap;
  510. /*
  511. * Try to remember where we decided to put the value.
  512. */
  513. nmap = 1;
  514. error = xfs_bmapi_read(args->dp, (xfs_fileoff_t)lblkno,
  515. blkcnt, &map, &nmap, XFS_BMAPI_ATTRFORK);
  516. if (error)
  517. return error;
  518. ASSERT(nmap == 1);
  519. ASSERT((map.br_startblock != DELAYSTARTBLOCK) &&
  520. (map.br_startblock != HOLESTARTBLOCK));
  521. dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock),
  522. dblkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);
  523. /*
  524. * If the "remote" value is in the cache, remove it.
  525. */
  526. bp = xfs_buf_incore(mp->m_ddev_targp, dblkno, dblkcnt, XBF_TRYLOCK);
  527. if (bp) {
  528. xfs_buf_stale(bp);
  529. xfs_buf_relse(bp);
  530. bp = NULL;
  531. }
  532. lblkno += map.br_blockcount;
  533. blkcnt -= map.br_blockcount;
  534. }
  535. /*
  536. * Keep de-allocating extents until the remote-value region is gone.
  537. */
  538. lblkno = args->rmtblkno;
  539. blkcnt = args->rmtblkcnt;
  540. done = 0;
  541. while (!done) {
  542. error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
  543. XFS_BMAPI_ATTRFORK, 1, &done);
  544. if (error)
  545. return error;
  546. error = xfs_defer_finish(&args->trans);
  547. if (error)
  548. return error;
  549. /*
  550. * Close out trans and start the next one in the chain.
  551. */
  552. error = xfs_trans_roll_inode(&args->trans, args->dp);
  553. if (error)
  554. return error;
  555. }
  556. return 0;
  557. }