Mercurial > hg > nginx
comparison src/core/ngx_open_file_cache.c @ 4161:010a0907bc95 stable-1.0
Merging r4077, r4101, r4102:
open_file_cache related fixes:
*) Bugfix: open_file_cache lost is_directio flag.
On file retest open_file_cache lost is_directio if file wasn't changed.
This caused unaligned operations under Linux to fail with EINVAL.
It wasn't noticeable with AIO though, as errors wasn't properly logged.
*) Bugfix: open_file_cache did not update file info on retest.
If file inode was not changed, cached file information was not updated
on retest. As a result stale information might be cached forever if file
attributes was changed and/or file was extended.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 30 Sep 2011 13:57:44 +0000 |
parents | e7cd13b7f759 |
children | 4919fb357a5d |
comparison
equal
deleted
inserted
replaced
4160:88369902edb1 | 4161:010a0907bc95 |
---|---|
282 goto add_event; | 282 goto add_event; |
283 } | 283 } |
284 | 284 |
285 if (of->uniq == file->uniq) { | 285 if (of->uniq == file->uniq) { |
286 | 286 |
287 file->count++; | |
288 | |
289 if (file->event) { | 287 if (file->event) { |
290 file->use_event = 1; | 288 file->use_event = 1; |
291 } | 289 } |
292 | 290 |
293 goto renew; | 291 of->is_directio = file->is_directio; |
292 | |
293 goto update; | |
294 } | 294 } |
295 | 295 |
296 /* file was changed */ | 296 /* file was changed */ |
297 | 297 |
298 } else { /* error to cache */ | 298 } else { /* error to cache */ |
391 | 391 |
392 if (!of->is_dir) { | 392 if (!of->is_dir) { |
393 file->count++; | 393 file->count++; |
394 } | 394 } |
395 } | 395 } |
396 | |
397 renew: | |
398 | 396 |
399 file->created = now; | 397 file->created = now; |
400 | 398 |
401 found: | 399 found: |
402 | 400 |