ファイルシステムの歴史: ジャーナリング編

03317f5624d43c689ba1f2a76fbde47e?s=47 naota
February 14, 2015

ファイルシステムの歴史: ジャーナリング編

03317f5624d43c689ba1f2a76fbde47e?s=128

naota

February 14, 2015
Tweet

Transcript

  1. ϑΝΠϧγεςϜͷྺ࢙: δϟʔ φϦϯάฤ Naohiro Aota (@naota344)

  2. ࣗݾ঺հ ໊લ: ੨ా௚େ ͓͋ͨͳ͓ͻΖ @naota344 ܚጯٛक़େֶͰϑΝΠϧγεςϜͷݚڀ Gentoo ίϛολ झຯ: FS

    Λյͨ͠ਓͷإ͕ݟ͍ͨ
  3. ࠷ۙͷ͜ͱ: btrfsck Λ͔͚ͯͨ

  4. ࡢ೔ btrfsck ͷதͷਓ͔ Βϝʔϧ͕དྷͨ

  5. ࡢ೔ btrfsck ͷதͷਓ͔ Βϝʔϧ͕དྷͨ ۙ೔ patch ͕౤ߘ༧ఆ! ͩͦ͏Ͱ͢

  6. ຊ೔ͷ͓୊ δϟʔφϦϯάͷྺ࢙

  7. δϟʔφϦϯά ͖ͯͱʔʹ FS ʹॻ͘ͱ FS ͸յΕΔ Ұ؏ੑΛ࣋ͬͯॻ͘΂͖มߋ͕த్൒୺ʹͳͬ ͯյΕΔ δϟʔφϦϯά Ұ౓δϟʔφϧྖҬʹ͜Ε͔Βॻ͘಺༰Λࣄલ

    ʹॻ͘ δϟʔφϧॻ͖ऴΘΔ -> ຊମʹॻ͖͜Έ ్தͰࢮΜͰ΋େৎ෉ ͍ΘΏΔ write-ahead-logging
  8. δϟʔφϦϯάॳग़ Reimplementing the Cedar file system using logging and group

    commit Robert Hagmann Xerox PARC 1987 ೥ Dorado, Dandelion ্Ͱಈ͍͍ͯͨ Cedar Λ Dragon ʹҠ২͢Δʹ͋ͨͬͯʮδϟʔφϦϯάʯ ͕௥Ճ͞Εͨ
  9. Cedar, Dorado, Dandelion, Dragon Cedar ϓϩάϥϛϯάݴޠͷ໊લ ͔ͭ, Cedar ͕ಈ࡞͢Δʮϓϩάϥϛϯά؀ڥʯ ͷ໊લ

    Dorado, Dandelion D-Machine, Lisp Ϛγϯ Dorado 24bit ͱ͍͏ large virtual address space 1024x808 ͷ large Ͱ high-resolution ͳനࠇσΟε ϓϨΠ ࠷େ 32MB ͷ෺ཧσΟεΫ
  10. લδϟʔφϦϯά࣌୅: TridentσΟε Ϋ Dorado, Dandelion ͸ Trident σΟεΫΛ࢖༻ http://www.computerhistory.org/ collections/catalog/102681543

    Image courtesy of Computer History Museum
  11. TridentσΟεΫ Trident disk for the Alto (1979) Trident σΟεΫͷඪ४తͳϑΥʔϚοτ͕ॻ͍ ͍ͯΔ

    ֤τϥοΫ (10080 words) = 9 ηΫλ x 1120 words ηΫλ͕ 3 ͭͷ෦෼ʹ෼͚ΒΕΔ ϔομ (2 words) ͦͷηΫλͷσΟεΫΞυϨε͕ॻ͍ͯ͋Δ ίϯτϩʔϥ͕ݕࠪ͢Δ ϥϕϧ (10 words) store file dependent information σʔλຊମ (1024 words) ֤ηΫλʹʮϥϕϧʯ͕෇͚ΒΕΔ
  12. δϟʔφϦϯάҎલͷCedar File Name Table ͸ B-tree FS ্ͷશͯͷ file ͷ໊લͱ

    header ৘ใΛอ࣋ ϥϕϧΛ༻͍ͨҰ؏ੑอূ uid, page number page type (header, free, data) ͕ه࿥͞ΕΔ
  13. FSD (File System for Dragon)

  14. ͦͷଞ ࠓ೔͸ FS յΕͯͳ͍͚Ͳɺ εϥΠυॻ ͨ͘Ίͷ Emacs ͕ SEGV Ͱىಈ͠ͳ

    ͔ͬͨΓɺԿ౓΋࿈ଧͯͨ͠Βٸʹىಈ ͯ͠Έ͍ͨͳײ͡ʹͳΓ·ͨ͠
  15. ͳΜͰ? emacs/src/xfns.c XGetICValues X ͷ input context ͷ৘ใͱͬͯ͘Δ Τϥʔͩͱ࠷ॳͷͱΕͳ͔ͬͨଐੑ໊͕ฦΔ attr

    = XVaCreateNestedList (0, XNAreaNeeded, &needed, NULL); XGetICValues (xic, XNStatusAttributes, attr, NULL); XFree (attr); if (needed->width == 0) { attr = XVaCreateNestedList (0, XNArea, &needed, NULL); XGetICValues (xic, XNStatusAttributes, attr, NULL); XFree (attr); } ʜ XFree (needed); <- ͜͜ͰࢮΜͰΔ
  16. ͦΓΎʔ͠ΐΜ ͳΜͰଐੑऔಘΤϥʔʹͳͬͯͨ? imsettings ͷ͍ͤͬΆ͍: imsettings = ͍ΖΜͳ IM ͷڞ௨ϨΠϠʹ͓Ε͕ͳΔ! uim

    ͱ͔ fcitx Λಈతʹม͑ΒΕΔͥ! ͦΓΎʔ͠ΐΜ XMODIFIERS=@im=fcitx emacs XMODIFIERS= emacs
  17. ·ͱΊ δϟʔφϦϯάͷ࿩Λੲ͔Βࠓ·Ͱͬ͘͞ͱ ͨ͠ imsettings ͸ͩΊͩ