Print this page
7378 exported_lock held during nfs4 compound processing


1563         if (exi != exi_public)
1564                 return (NULL);
1565 
1566         /*
1567          * Here we have an exi that is not marked for logging.
1568          * It is possible that this request is a multicomponent lookup
1569          * that was done from the public file handle (not logged) and
1570          * the resulting file handle being returned to the client exists
1571          * in a file system that is being logged.  If this is the case
1572          * we need to log this multicomponent lookup to the appropriate
1573          * log buffer.  This will allow for the appropriate path name
1574          * mapping to occur at user level.
1575          */
1576         if (req->rq_prog == NFS_PROGRAM) {
1577                 switch (req->rq_vers) {
1578                 case NFS_V3:
1579                         if ((req->rq_proc == NFSPROC3_LOOKUP) &&
1580                             (((LOOKUP3res *)res)->status == NFS3_OK)) {
1581                                 fh3 = &((LOOKUP3res *)res)->res_u.ok.object;
1582                                 exi_ret = checkexport(&fh3->fh3_fsid,
1583                                     FH3TOXFIDP(fh3));
1584                         }
1585                         break;
1586 
1587                 case NFS_VERSION:
1588                         if ((req->rq_proc == RFS_LOOKUP) &&
1589                             (((struct nfsdiropres *)
1590                             res)->dr_status == NFS_OK)) {
1591                                 fh =  &((struct nfsdiropres *)res)->
1592                                     dr_u.dr_drok_u.drok_fhandle;
1593                                 exi_ret = checkexport(&fh->fh_fsid,
1594                                     (fid_t *)&fh->fh_xlen);
1595                         }
1596                         break;
1597                 default:
1598                         break;
1599                 }
1600         }
1601 
1602         if (exi_ret != NULL && exi_ret->exi_export.ex_flags & EX_LOG) {
1603                 lb = exi_ret->exi_logbuffer;
1604                 /* obtain the unique record id for the caller */
1605                 *nfslog_rec_id = atomic_add_32_nv(&lb->lb_rec_id, (int32_t)1);
1606 
1607                 return (exi_ret);
1608         }
1609         return (NULL);
1610 }
1611 
1612 #ifdef DEBUG
1613 static long long rfslog_records_ignored = 0;
1614 #endif




1563         if (exi != exi_public)
1564                 return (NULL);
1565 
1566         /*
1567          * Here we have an exi that is not marked for logging.
1568          * It is possible that this request is a multicomponent lookup
1569          * that was done from the public file handle (not logged) and
1570          * the resulting file handle being returned to the client exists
1571          * in a file system that is being logged.  If this is the case
1572          * we need to log this multicomponent lookup to the appropriate
1573          * log buffer.  This will allow for the appropriate path name
1574          * mapping to occur at user level.
1575          */
1576         if (req->rq_prog == NFS_PROGRAM) {
1577                 switch (req->rq_vers) {
1578                 case NFS_V3:
1579                         if ((req->rq_proc == NFSPROC3_LOOKUP) &&
1580                             (((LOOKUP3res *)res)->status == NFS3_OK)) {
1581                                 fh3 = &((LOOKUP3res *)res)->res_u.ok.object;
1582                                 exi_ret = checkexport(&fh3->fh3_fsid,
1583                                     FH3TOXFIDP(fh3), NULL);
1584                         }
1585                         break;
1586 
1587                 case NFS_VERSION:
1588                         if ((req->rq_proc == RFS_LOOKUP) &&
1589                             (((struct nfsdiropres *)
1590                             res)->dr_status == NFS_OK)) {
1591                                 fh =  &((struct nfsdiropres *)res)->
1592                                     dr_u.dr_drok_u.drok_fhandle;
1593                                 exi_ret = checkexport(&fh->fh_fsid,
1594                                     (fid_t *)&fh->fh_xlen, NULL);
1595                         }
1596                         break;
1597                 default:
1598                         break;
1599                 }
1600         }
1601 
1602         if (exi_ret != NULL && exi_ret->exi_export.ex_flags & EX_LOG) {
1603                 lb = exi_ret->exi_logbuffer;
1604                 /* obtain the unique record id for the caller */
1605                 *nfslog_rec_id = atomic_add_32_nv(&lb->lb_rec_id, (int32_t)1);
1606 
1607                 return (exi_ret);
1608         }
1609         return (NULL);
1610 }
1611 
1612 #ifdef DEBUG
1613 static long long rfslog_records_ignored = 0;
1614 #endif