Commit graph

37 commits

Author SHA1 Message Date
chrislu 28fe578944 avoid possible nil entry 2023-01-10 01:07:34 -08:00
Chris Lu d4566d4aaa
more solid weed mount (#4089)
* compare chunks by timestamp

* fix slab clearing error

* fix test compilation

* move oldest chunk to sealed, instead of by fullness

* lock on fh.entryViewCache

* remove verbose logs

* revert slat clearing

* less logs

* less logs

* track write and read by timestamp

* remove useless logic

* add entry lock on file handle release

* use mem chunk only, swap file chunk has problems

* comment out code that maybe used later

* add debug mode to compare data read and write

* more efficient readResolvedChunks with linked list

* small optimization

* fix test compilation

* minor fix on writer

* add SeparateGarbageChunks

* group chunks into sections

* turn off debug mode

* fix tests

* fix tests

* tmp enable swap file chunk

* Revert "tmp enable swap file chunk"

This reverts commit 985137ec47.

* simple refactoring

* simple refactoring

* do not re-use swap file chunk. Sealed chunks should not be re-used.

* comment out debugging facilities

* either mem chunk or swap file chunk is fine now

* remove orderedMutex  as *semaphore.Weighted

not found impactful

* optimize size calculation for changing large files

* optimize performance to avoid going through the long list of chunks

* still problems with swap file chunk

* rename

* tiny optimization

* swap file chunk save only successfully read data

* fix

* enable both mem and swap file chunk

* resolve chunks with range

* rename

* fix chunk interval list

* also change file handle chunk group when adding chunks

* pick in-active chunk with time-decayed counter

* fix compilation

* avoid nil with empty fh.entry

* refactoring

* rename

* rename

* refactor visible intervals to *list.List

* refactor chunkViews to *list.List

* add IntervalList for generic interval list

* change visible interval to use IntervalList in generics

* cahnge chunkViews to *IntervalList[*ChunkView]

* use NewFileChunkSection to create

* rename variables

* refactor

* fix renaming leftover

* renaming

* renaming

* add insert interval

* interval list adds lock

* incrementally add chunks to readers

Fixes:
1. set start and stop offset for the value object
2. clone the value object
3. use pointer instead of copy-by-value when passing to interval.Value
4. use insert interval since adding chunk could be out of order

* fix tests compilation

* fix tests compilation
2023-01-02 23:20:45 -08:00
Chris Lu dac9c28d05
Revert "refactor: moved to locked entry" (#4035)
* Revert "refactor: moved to locked entry"

This reverts commit 94bc9afd9d.

* only add LockedEntry, no changes to entryLock

* fix compilation
2022-12-05 12:32:27 -08:00
chrislu 94bc9afd9d refactor: moved to locked entry 2022-12-04 23:33:05 -08:00
chrislu 70a4c98b00 refactor filer_pb.Entry and filer.Entry to use GetChunks()
for later locking on reading chunks
2022-11-15 06:33:36 -08:00
chrislu 8a880a139d mount: fix truncate operation
fix https://github.com/seaweedfs/seaweedfs/issues/2609
2022-08-06 13:58:45 -07:00
chrislu bd13a7968f remove unused symlink resolving 2022-08-04 01:35:18 -07:00
chrislu 26dbc6c905 move to https://github.com/seaweedfs/seaweedfs 2022-07-29 00:17:28 -07:00
chrislu f401b996eb mount: fix symlink size reporting 2022-07-26 23:12:25 -07:00
chrislu b98c0b4bf4 disable symlink translation for now 2022-07-24 18:46:32 -07:00
chrislu 2dc5d4adac disable symlink translation for now 2022-07-24 18:24:34 -07:00
chrislu a5c94acd4f mount: check possible nil entry case 2022-07-22 15:33:37 -07:00
chrislu d65bb2c6df mount: file handle locks entry better
related to https://github.com/chrislusf/seaweedfs/issues/2952
2022-06-05 18:15:06 -07:00
chrislu b597baf488 mount: set file write time correct to work well with rsync
fix https://github.com/chrislusf/seaweedfs/issues/2867
2022-04-16 22:56:45 -07:00
chrislu 9d44b89c21 Revert "avoid possible nil attributes"
This reverts commit 0a6703c7f7.
2022-04-06 10:01:45 -07:00
chrislu 0a6703c7f7 avoid possible nil attributes 2022-04-06 09:58:48 -07:00
chrislu b40d252761 mount: chmod for root 2022-03-12 12:10:56 -08:00
chrislu f3442e36e6 mount: quota adjust error type to be syscall.ENOSPC 2022-03-06 17:04:21 -08:00
chrislu b7c992f410 add flag to enforce quota 2022-03-05 22:10:43 -08:00
chrislu ceaf993a27 mount2: add rdev 2022-02-24 14:51:25 -08:00
chrislu e31ec04f4f mount2: POSIX deleted opened file nlink should be 0 2022-02-24 01:59:37 -08:00
chrislu 91f0481f4e mount2: SetAttr set mode correctly 2022-02-24 01:31:04 -08:00
chrislu e8ce30fdc5 mount2: adjust file mode 2022-02-18 00:47:02 -08:00
chrislu 4244ef8b72 fix building on linux 2022-02-14 02:59:27 -08:00
chrislu fe57a2e770 file set attribute 2022-02-14 01:36:10 -08:00
chrislu 6a42cb6b0b supports mknod, unlink 2022-02-13 03:09:24 -08:00
chrislu e85ca10a1a add mkdir 2022-02-13 01:34:19 -08:00
chrislu 21046c6a28 split files 2022-02-13 01:05:30 -08:00
chrislu a4c9223b9d support xattr 2022-02-13 00:58:46 -08:00
chrislu c81833a192 add directory setAttr 2022-02-12 23:08:56 -08:00
chrislu 5c48c23235 remove println 2022-02-12 22:45:07 -08:00
chrislu 4c75fd5f9c sync format 2022-02-12 22:41:29 -08:00
chrislu b0a5193e32 working 2022-02-12 22:21:30 -08:00
chrislu 5a0a709016 it runs, but directory listing output is not showing up 2022-02-12 05:27:16 -08:00
chrislu 72faae91e1 implement read directory and read directory plus 2022-02-12 02:48:44 -08:00
chrislu a10c28ba82 simplify 2022-02-12 01:59:36 -08:00
chrislu f4d88862c4 can attr root directory 2022-02-12 01:54:16 -08:00