Ticket #2541 (closed defect: fixed)

Opened 14 years ago

Last modified 13 years ago

mc quits with excessive audible I/O loads

Reported by: cosoleto Owned by: andrew_b
Priority: major Milestone: 4.8.0-pre1
Component: mc-core Version: 4.7.5
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master committed-stable

Description

Hello,

Since commit a931ff73ccecbe5c0938b110e56f62570146409a

Author: Slava Zanko <slavazanko@…>
Date: Mon Oct 5 13:15:30 2009 +0300

Ticket #1617: ownership of files ~/.mc

that changes how mc saves config files, when you quit mc or mcedit you can get noise due to seeking at least on systems with non-silent disk drive (I own a WD Raptor). In spite of config files size. I think this is a bug, as well as a regression.

I got the time to see that the function mc_config_new_or_override_file() is called more times with the same filename and removing O_SYNC in mc_open() mades the operation silent to me. Maybe there isn't a good combination of things.

From mc_config_new_or_override_file():

fd = mc_open (ini_path, O_WRONLY | O_TRUNC | O_SYNC, 0);

[...]

for (written_data = data, total_written = len;

(cur_written = mc_write (fd, (const void *) written_data, total_written)) > 0;
written_data += cur_written, total_written -= cur_written) {

open sequence while mc quits:
open("/home/fra/.mc/ini", O_WRONLY|O_TRUNC|O_SYNC) = 9
open("/home/fra/.mc/ini", O_WRONLY|O_TRUNC|O_SYNC) = 9
open("/home/fra/.mc/ini", O_WRONLY|O_TRUNC|O_SYNC) = 9
open("/home/fra/.mc/panels.ini", O_WRONLY|O_TRUNC|O_SYNC) = 9
open("/home/fra/.mc/ini", O_WRONLY|O_TRUNC|O_SYNC) = 9
open("/home/fra/.mc/history", O_WRONLY|O_TRUNC|O_SYNC) = 9
open("/home/fra/.mc/history", O_WRONLY|O_TRUNC|O_SYNC) = 9
open("/home/fra/.mc/history", O_WRONLY|O_TRUNC|O_SYNC) = 9

Change History

comment:1 Changed 55 years ago by slavazanko

  • Blocking 2545 added

comment:1 Changed 14 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b

comment:2 Changed 14 years ago by cosoleto

  • Component changed from mc-core to mc-config-ini

comment:3 Changed 14 years ago by andrew_b

  • Component changed from mc-config-ini to mc-core

Please don't modify ticket if you don't know exactly what you do.

comment:4 Changed 14 years ago by andrew_b

  • Keywords stable-candidate added
  • severity changed from no branch to on review
  • Milestone changed from 4.8 to 4.8.0-pre1

Created 2541_save_setup branch. Parent: master.
Initial changeset:5fe608706c33deb59883822b656d1c4829770efd

comment:5 Changed 14 years ago by cosoleto

Thanks for taking care of this bug report (and sorry for my previous mistake with "component" bug tracker field). I applied locally your patch. Anyway, a single low-level write() call with O_SYNC flag enabled looks enough to trigger the non-nice seek sound and so I wonder whether you think to change there something.

comment:6 Changed 14 years ago by andrew_b

OK, we discussed O_SYNC flag usage and decided remove it.

Please review 2541_save_setup branch and vote for it.

comment:7 Changed 14 years ago by angel_il

  • Votes for changeset set to angel_il

comment:8 Changed 14 years ago by cosoleto

I am not sure about correctness of new save path to '.cache' directory. My idea of cache is what the program can recreate easily based on user usage of a program, not based directly on user input data. In my opinion, deleting the '~.cache' directory should be only to save space or so, not to delete history, panel config, file positions...

comment:9 Changed 13 years ago by slavazanko

  • Cc slavazanko@… removed
  • Votes for changeset changed from angel_il to angel_il slavazanko
  • severity changed from on review to approved

comment:10 Changed 13 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from angel_il slavazanko to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged
  • Blocking 2545 removed

Merged to master.
changeset:fcfa76be3d315f23dd5c2b282234f9d9fc39b69a

git log --pretty=oneline 417d550..fcfa76b

comment:11 Changed 13 years ago by andrew_b

Created 2541_save_setup_stable branch (parent: 4.7.5-stable)
Initial changeset:db0cc809fccdb32c91e8c868cc8efaa5bb142409

comment:12 Changed 13 years ago by slavazanko

  • Votes for changeset changed from committed-master to slavazanko
  • Branch state set to no branch

comment:13 Changed 13 years ago by slavazanko

  • Branch state changed from no branch to on review

comment:14 Changed 13 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • Branch state changed from on review to approved

comment:15 Changed 13 years ago by andrew_b

  • Status changed from testing to closed
  • Keywords stable-candidate removed
  • Votes for changeset changed from slavazanko angel_il to committed-master committed-stable
  • Branch state changed from approved to merged

Merged to 4.7.5-stable.
changeset:109a6fb7b1da53af53f0bde08ef6e228ca472fe6

git log --pretty=oneline fcec787..109a6fb
Note: See TracTickets for help on using tickets.