2018/3/17

把google photo 中高解析的照片換成低解析不,不佔空間

How to Convert Full Resolution Photos to Free Unlimited?
有一個 Recover storage 的 button..
按下去,等一下..(好幾小時) 到 google driver 去看 storage quota, google photo 佔的就變成 0 了。

2018/3/16

couldn't mount RDWR because of unsupported optional features (400)

linux-couldnt-mount-rdwr-because-of-unsupported-optional-features-400

所以 follow 這一篇...
用 tune2fs -l 列出用 prebuilt/linux-x86/mkfs/make_ext4s 和 系統 mkfs.ext4 format 過得 block deviice, feature 部份...
make_ext4fs:
Filesystem volume name:   
Last mounted on:          
Filesystem UUID:          57f8f4bc-abf4-0000-675f-946fc0f9f25b
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal resize_inode filetype extent sparse_super large_file
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Remount read-only
Filesystem OS type:       Linux
Inode count:              6400
Block count:              25600
Reserved block count:     0
Free blocks:              24162
Free inodes:              6389
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      7
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         6400
Inode blocks per group:   400
Last mount time:          n/a
Last write time:          Thu Jan  1 08:00:00 1970
Mount count:              0
Maximum mount count:      -1
Last checked:             Thu Jan  1 08:00:00 1970
Check interval:           0 ()
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   tea
Journal backup:           inode blocks

mkfs.ext4:
Filesystem volume name:   
Last mounted on:          
Filesystem UUID:          b4eaefc3-2856-4c9f-9abd-4b65a2fbd6f0
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              64000
Block count:              256000
Reserved block count:     12800
Free blocks:              247252
Free inodes:              63989
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      124
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8000
Inode blocks per group:   500
Flex block group size:    16
Filesystem created:       Fri Mar 16 18:35:45 2018
Last mount time:          n/a
Last write time:          Fri Mar 16 18:35:45 2018
Mount count:              0
Maximum mount count:      -1
Last checked:             Fri Mar 16 18:35:45 2018
Check interval:           0 ()
Lifetime writes:          17 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      0a08ac54-71c0-4329-93b6-8830d536aaba
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0x9b3ce51d
果然 filesystem feature 部份差異很多..

2018/3/14

refcode, dump_sector..

void dump_sector(unsigned char *buf, int len)
{
        int i, j;

        printk(KERN_ERR " Sector Dump \n");

        for (i = 0 ; i < len ; i += 16) {
                printk(KERN_ERR "%04d: ", i);

                for (j = 0 ; j < 16 ; j++) {
                        unsigned char c = buf[i+j];
                        if (c >= 0x20 && c < 0x7e)
                                printk(" %c ", buf[i+j]);  // 如果不用印出 ascii 的話,就不用這個判斷..
                        else
                                printk("%02x ", buf[i+j]);
                }

                printk("\n");
        }
}
常常會用到...

sudo PATH

ref:How to make sudo preserve $PATH

sudo 的 PATH 和user 不一樣。
設定在 /etc/sudoers :
Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
所以要改的話....

2018/2/8

phabricator : repository URI I/O Type Observe

observer 的 uri 跟 mirror 剛好相反,自己不 host repo,但是會定期的向這個 observe uri 做 pull。
repo 的 uri 中有一個是 observe 時,其他的 uri 不可以有 write 屬性,因為這個 repo 無法 push 到 observe uri去。

對 obvsere uri 的 repo 操作。
programmer 直接clone remote (observe) uri 的 server project。
一樣 commit, arc diff 操作。
就跟對 phabricator host 的 repo 一樣。
arc 會產生 rev code,送 review request。
approve 後arc land 會 commit , push 到 這個 server (不是 pha server)。
然後在 phabicator 的 differential 上也會出現 rev diff code diff。
也會有 commit log。