2011-09-20 12 views
6

ext3 में 3 जर्नलिंग विकल्प हैं: जर्नल, ऑर्डर और लिबैक। विकिपीडिया entry के अनुसार, ये सीमा कम से कम जोखिम भरा क्रैश रिकवरी के लिए सबसे खतरनाक है। किसी कारण से, एंड्रॉइड का लिनक्स का संस्करण केवल बाद के दो विकल्पों का समर्थन करता है, और लिखने के लिए डिफ़ॉल्ट है। (मैं फियोयो चला रहा हूं)एंड्रॉइड फाइल सिस्टम जर्नलिंग

जर्नल मोड के लिए समर्थन जोड़ने का कोई तरीका है? मैं इसे/डेटा विभाजन पर करना चाहता हूं, जो ext3 है, और यह भी कि जहां अधिकांश फ़ाइल लिखती हैं। मेरे डिवाइस में बैटरी नहीं है, इसलिए मुझे यह सुनिश्चित करने की ज़रूरत है कि जब कोई बिजली को डिस्कनेक्ट करता है तो यह क्रैश सबूत होता है।

यदि कोई दिलचस्पी लेता है, तो लिनक्स विकल्प कर्नेल/एफएस/ext3/Kconfig में परिभाषित किए जाते हैं। विशिष्ट विकल्प EXT3_DEFAULTS_TO_ORDERED है।

+1

मेरा अनुमान है कि उन्होंने फ्लैश मेमोरी के सीमित लेखन चक्रों के कारण पूर्ण जर्नलिंग का उपयोग नहीं करना चुना है। यदि आप वास्तव में अपने फ्लैश को पहनना चाहते हैं, तो आप कर्नेल को फिर से संकलित करने में सक्षम होना चाहिए जो आप चाहते हैं। यह स्पष्ट रूप से आपके डिवाइस पर कर्नेल को वापस फ्लैश करने के कुछ तरीके की आवश्यकता है - जो आपके पास मौजूद डिवाइस के आधार पर संभव या आसान हो सकता है या नहीं। – JesusFreke

+1

कोई विचार है कि पूर्ण जर्नल विकल्प के साथ कर्नेल को फिर से संकलित कैसे करें? जैसा कि ऊपर बताया गया है, वर्तमान में Kconfig में केवल दो विकल्प हैं। सीमित लेखन चक्रों के लिए, मैं ईएमएमसी का उपयोग कर रहा हूं जो लेवलिंग पहनता है, लेकिन मैं सहमत हूं, पूर्ण जर्नलिंग अधिक पहनने का कारण बनती है। मैं कर्नेल को डिवाइस पर फ्लैश करने में सक्षम हूं क्योंकि मेरी कंपनी वास्तव में डिवाइस का निर्माण कर रही है। – Ravi

उत्तर

1

समाधान निम्न को कर्नेल/एफएस/ext3/Kconfig में जोड़ने के लिए था, और कर्नेल को EXT3_DEFAULTS_TO_JOURNAL के साथ पुनर्निर्माण करना था।

choice 
    prompt "EXT3 default journal mode" 
    default EXT3_DEFAULTS_TO_ORDERED 
    help 
     The journal mode options for ext3 have different tradeoffs 
     between when data is guaranteed to be on disk and 
     performance. The use of "data=writeback" can cause 
     unwritten data to appear in files after an system crash or 
     power failure, which can be a security issue. However, 
     "data=ordered" mode can also result in major performance 
     problems, including seconds-long delays before an fsync() 
     call returns. "data=journal" is the safest option but possibly 
     the the great perfromance burden. For details, see: 

     http://ext4.wiki.kernel.org/index.php/Ext3_data_mode_tradeoffs 

     If you have been historically happy with ext3's performance, 
     data=ordered mode will be a safe choice. 


config EXT3_DEFAULTS_TO_JOURNAL 
    bool "Default to 'data=journal' in ext3" 
    depends on EXT3_FS 
    help 
     Both data and metadata are journaled. Should be safe 
     against crashes, power failure, etc. 


config EXT3_DEFAULTS_TO_ORDERED 
    bool "Default to 'data=ordered' in ext3" 
    depends on EXT3_FS 
    help 
     Only metadata are journaled. Data is written first and then 
     metadata is update. Mostly safe against crashes, power 
     failures, etc., except if the anomally occurred while a file 
     is being overwritten. Most of the time files are appended and 
     not over written. 

config EXT3_DEFAULTS_TO_WRITEBACK 
    bool "Default to 'data=writeback' in ext3" 
    depends on EXT3_FS 
    help 
     Ext2 with a fast ckfs. Not always safe against crashes, 
     power failure, etc., but has the best preformance 

endchoice