xfs_attr_remote.c 15 KB

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