Ошибки файловой системы

Drive subsystem, filesystem drivers
  • Current FS code works like this: lock (a mutex guarding access to) a partition, read/write data, unlock the partition.
    When a thread crashes while reading/writing, the partition is left locked. Therefore other programs can't acquire the lock and access that partition anymore.

    To illustrate this logic you can run board to save its log to e.g. /hd0/1/, and then run your test program. This way /tmp0/1/ will be locked but board will be still working with /hd0/1/.

    In theory, kernel could release acquired locks when threads crash. In practice, kernel has no idea what locks have been acquired by a given thread.
    It is possilble to modify FS code to fill an array of acquired locks. In fact, this is very similar to an array of file descriptors.

    So, resolution of this issue could be a side effect of file descriptors when they are implemented.
  • As this is a critical issue, can we have a temporary solution to fix such lock?
    Из хаоса в космос
  • Sorry, but I'm not ready to start this work. I have many things started that are waiting to be finished.
    If somebody wants to work on the issue, I can share my knowledge of FS code.

    I have filed a bug 139.
  • In revision #8680 there seems to be a regression with file working.
    Reproduces with acpi app from this comment viewtopic.php?f=1&t=1195&hilit=devices. ... 105#p37822 => devices.dat and log files are 0 bytes and there is an error "sysfunc70 addr error" in the Board.
    I already notified the commit author rgimad and he will check the issue.
    Из хаоса в космос
  • I temporarily disabled safety checks in sysfn70 , so acpi driver works now. But in future we need to add filesystem functions to kernel exports and make drivers use them. Drivers must not use sysfns via int 0x40, they are not userspace programs.
    The best way to predict the future is to create it.
  • У меня на ПК не доступен мой главный диск D: тот что Work.
    Ни в режиме ACHI ни IDE (список одинаков для обоих режимов), так что тут ядро, а не драйвер.

    Список дисков в Колибри выглядит странно.
    Смотрите скрины.
    Attachments
    first32k (32 KiB)
    Downloaded 155 times
    Screenshot_2.png
    Screenshot_2.png (103.89 KiB)
    Viewed 4676 times
    Last edited by Leency on Thu Jul 08, 2021 9:24 pm, edited 2 times in total.
    Из хаоса в космос
  • Looks like something goes wrong in MBR or GPT code.
    Please, attach first 32kB of these disks like you did here.
  • dunkaist wrote:Looks like something goes wrong in MBR or GPT code.
    Please, attach first 32kB of these disks like you did here.
    My previous post was updated.
    Btw, Elementary OS (Linux) where I've taken dd, do not show my D:[Work] volume in File manager.
    Из хаоса в космос
  • The short story of _what_ happend:
    • GetFileInfo (sf70.5) called here returned an error code sometimes,
    • the return value wasn't checked,
    • the buffer had uninitialized data,
    • which led to strange disk size.
    The longer story of _why_ it happened.
    • A partition size that is reported by sf70.5 is read by FS-specific code. E.g. if /hd0/1 is FAT, then fat_GetFileInfo is called to get its size.
    • Yes, partition size doesn't depend on a particular FS on it: you can format the same partition as FAT, then EXT. But the code is written so that FS-specific code reports the size of the underlying partition.
    • So if FS isn't supported, then there is no FS-specific code associated with the partition to report its size.
    • Yes, there is a default/fallback stub for the case when no real FS was detected on a partition. But that stub returned the _not_implemented_ error unconditionally.
    • I implemented sf70.5 for that stub to report a partition size in #9043. This should resolve the issue with wrong partition sizes.
    • The issue with NTFS is a separate one. I'm not familiar with NTFS and therefore I have no idea of what's going on there.
    • But a dump of the partition's superblock is a common place to start. So, please, run one more command and attach resulting superblock file.

      Code: Select all

      dd if=/dev/sda6 of=superb bs=512 count=2
    p.s. -- GPT code was ok
  • Here is the file.

    Thanks for the bug report of Eolite! This is fixed.
    Attachments
    superb (1 KiB)
    Downloaded 155 times
    Из хаоса в космос
  • The file doesn't look like a superblock. It looks more like to random data or something encrypted.
    Leency wrote:Btw, Elementary OS (Linux) where I've taken dd, do not show my D:[Work] volume in File manager.
    So, is it encrypted?
  • I don't really know what it was. I formatted by disk and now C: and D: so now disks are available.
    Thanks for support.
    Из хаоса в космос
  • (Offtopic) Вопрос не относящийся к Kolibrios, но близок к теме топика.

    У меня, при использовании Xenial Puppy LiveCD видятся все внешние диски на интерфейсе USB (подключен SSD)
    а при загрузке Bionic (Fossa) Puppy LiveCD один из дисков не виден в системе.
    Этому есть какое то объяснение?

    P.S. И ещё попутно заметил, что DosBox не отображает директорию диска примонтированного внешнего диска с USB.
  • KPG wrote:P.S. И ещё попутно заметил, что DosBox не отображает директорию диска примонтированного внешнего диска с USB.
    This bug? viewtopic.php?f=43&t=671&start=120#p76432
    KPG wrote:(Offtopic) Вопрос не относящийся к Kolibrios, но близок к теме топика.

    У меня, при использовании Xenial Puppy LiveCD видятся все внешние диски на интерфейсе USB (подключен SSD)
    а при загрузке Bionic (Fossa) Puppy LiveCD один из дисков не виден в системе.
    Этому есть какое то объяснение?
    Что ты имеешь в виду под "не виден"? В lsblk (или blkid) он есть? Речь именно про диск или про раздел и ФС на нём?
  • Who is online

    Users browsing this forum: No registered users and 3 guests