Print this page
patch remove-dont-swap-flag


1194         caller_context_t ct;
1195 
1196         if (!rfs_write_async) {
1197                 rfs_write_sync(wa, ns, exi, req, cr);
1198                 return;
1199         }
1200 
1201         /*
1202          * Initialize status to RFSWRITE_INITVAL instead of 0, since value of 0
1203          * is considered an OK.
1204          */
1205         ns->ns_status = RFSWRITE_INITVAL;
1206 
1207         nrp = &nrpsp;
1208         nrp->wa = wa;
1209         nrp->ns = ns;
1210         nrp->req = req;
1211         nrp->cr = cr;
1212         nrp->thread = curthread;
1213 
1214         ASSERT(curthread->t_schedflag & TS_DONT_SWAP);
1215 
1216         /*
1217          * Look to see if there is already a cluster started
1218          * for this file.
1219          */
1220         mutex_enter(&rfs_async_write_lock);
1221         for (lp = rfs_async_write_head; lp != NULL; lp = lp->next) {
1222                 if (bcmp(&wa->wa_fhandle, lp->fhp,
1223                     sizeof (fhandle_t)) == 0)
1224                         break;
1225         }
1226 
1227         /*
1228          * If lp is non-NULL, then there is already a cluster
1229          * started.  We need to place ourselves in the cluster
1230          * list in the right place as determined by starting
1231          * offset.  Conflicts with non-blocking mandatory locked
1232          * regions will be checked when the cluster is processed.
1233          */
1234         if (lp != NULL) {
1235                 rp = lp->list;




1194         caller_context_t ct;
1195 
1196         if (!rfs_write_async) {
1197                 rfs_write_sync(wa, ns, exi, req, cr);
1198                 return;
1199         }
1200 
1201         /*
1202          * Initialize status to RFSWRITE_INITVAL instead of 0, since value of 0
1203          * is considered an OK.
1204          */
1205         ns->ns_status = RFSWRITE_INITVAL;
1206 
1207         nrp = &nrpsp;
1208         nrp->wa = wa;
1209         nrp->ns = ns;
1210         nrp->req = req;
1211         nrp->cr = cr;
1212         nrp->thread = curthread;
1213 


1214         /*
1215          * Look to see if there is already a cluster started
1216          * for this file.
1217          */
1218         mutex_enter(&rfs_async_write_lock);
1219         for (lp = rfs_async_write_head; lp != NULL; lp = lp->next) {
1220                 if (bcmp(&wa->wa_fhandle, lp->fhp,
1221                     sizeof (fhandle_t)) == 0)
1222                         break;
1223         }
1224 
1225         /*
1226          * If lp is non-NULL, then there is already a cluster
1227          * started.  We need to place ourselves in the cluster
1228          * list in the right place as determined by starting
1229          * offset.  Conflicts with non-blocking mandatory locked
1230          * regions will be checked when the cluster is processed.
1231          */
1232         if (lp != NULL) {
1233                 rp = lp->list;