[pso] Tema 3 Linux...nu apare nimic in fisierele suport

Rizoiu Valentin pso@cursuri.cs.pub.ro
Tue, 4 May 2004 14:00:10 -0700 (PDT)


--0-1203986233-1083704410=:96468
Content-Type: text/plain; charset=us-ascii

As avea si eu o intrebare legata de tema 3 Linux...
  functia de request pe care am implementat-o e asemanatoare cu cea data la laborator ( a se vedea laboratorul  7 (the hard way) )...programul ruleaza "ok"...in sensul k trece toate testele...dar in fisierul de suport nu imi apare nimik ( mentionez ca in rutina do_transfer, la partea de WRITE am ceva gen:
...if(req->cmd == WRITE)
    {
     lseek(fd, req->bh->b_rsector * sector_size[minor], SEEK_SET);
     write(fd,  req->bh->b_data,  req->bh->b_size); 
     return 1;
  }
 ...dar write(...) se pare k e degeaba ( cred k din cauza cache-ului) ...Daq cineva are vreo idee referitor la ce s-ar putea face k sa pot scrie totusi si pe disk, l-ash ruga sa dea un reply...

		
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 
--0-1203986233-1083704410=:96468
Content-Type: text/html; charset=us-ascii

<DIV>As avea si eu&nbsp;o intrebare legata de tema 3 Linux...</DIV>
<DIV>&nbsp; functia de request pe care am implementat-o e asemanatoare cu cea data&nbsp;la laborator ( a se vedea laboratorul&nbsp; 7 (the hard way) )...programul ruleaza "ok"...in sensul k trece toate testele...dar in fisierul de suport nu imi apare nimik ( mentionez ca in rutina do_transfer, la partea de WRITE&nbsp;am ceva gen:</DIV>
<DIV>...if(req-&gt;cmd == WRITE)</DIV>
<DIV>&nbsp;&nbsp; &nbsp;{</DIV>
<DIV>&nbsp;&nbsp;&nbsp; &nbsp;lseek(fd, req-&gt;bh-&gt;b_rsector * sector_size[minor], SEEK_SET);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write(fd,&nbsp; req-&gt;bh-&gt;b_data,&nbsp; req-&gt;bh-&gt;b_size); </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; return 1;</DIV>
<DIV>&nbsp; }<BR>&nbsp;...dar write(...) se pare k e degeaba ( cred k din cauza cache-ului) ...Daq cineva&nbsp;are vreo idee referitor la ce s-ar putea face k sa pot scrie totusi si pe disk, l-ash ruga sa dea un reply...</DIV><p>
		<hr size=1><font face=arial size=-1>Do you Yahoo!?<br><a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/hotjobs/hotjobs_mail_signature_footer_textlink/evt=23983/*http://hotjobs.sweepstakes.yahoo.com/careermakeover">Win a $20,000 Career Makeover at Yahoo! HotJobs </a>
--0-1203986233-1083704410=:96468--