xfs_attr_remote.c 15 KB

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